Skip to content

Commit

Permalink
ffi: fix Unresolved reference: Cleaner error when compiling kotlin …
Browse files Browse the repository at this point in the history
…bindings

* Bump `gradle` to `8.4`
* Bump `com.android.tools.build:gradle` to `8.3.0`
* Bump `compileSdk` to `33`
* Remove `targetSdk`
* Remove `package` from `AndroidManifest.xml`
* Add android `namespace`
* Add `android_cleaner = true` in `uniffi.toml`
  • Loading branch information
yukibtc committed Mar 14, 2024
1 parent 12d55f4 commit 903aa43
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bindings/nostr-ffi/bindings-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.2")
classpath("com.android.tools.build:gradle:8.3.0")
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 5 additions & 3 deletions bindings/nostr-ffi/bindings-android/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ repositories {
}

android {
compileSdk = 31
namespace = "rust.nostr.protocol"

compileSdk = 33

defaultConfig {
minSdk = 21
targetSdk = 31

consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
getByName("release") {
release {
isMinifyEnabled = false
proguardFiles(file("proguard-android-optimize.txt"), file("proguard-rules.pro"))
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="rust.nostr">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />

</manifest>
3 changes: 2 additions & 1 deletion bindings/nostr-ffi/uniffi.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[bindings.kotlin]
package_name = "rust.nostr.protocol"
package_name = "rust.nostr.protocol"
android_cleaner = true
2 changes: 1 addition & 1 deletion bindings/nostr-sdk-ffi/bindings-android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.2")
classpath("com.android.tools.build:gradle:8.3.0")
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 5 additions & 3 deletions bindings/nostr-sdk-ffi/bindings-android/lib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ repositories {
}

android {
compileSdk = 31
namespace = "rust.nostr.sdk"

compileSdk = 33

defaultConfig {
minSdk = 21
targetSdk = 31

consumerProguardFiles("consumer-rules.pro")
}

buildTypes {
getByName("release") {
release {
isMinifyEnabled = false
proguardFiles(file("proguard-android-optimize.txt"), file("proguard-rules.pro"))
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="rust.nostr.sdk">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />

</manifest>
1 change: 1 addition & 0 deletions bindings/nostr-sdk-ffi/uniffi.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[bindings.kotlin]
package_name = "rust.nostr.sdk"
android_cleaner = true

0 comments on commit 903aa43

Please sign in to comment.