Skip to content

Commit

Permalink
updated config for gradle 7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
dileping committed Feb 25, 2023
1 parent 4c1a376 commit d9d79ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions examples/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ android {

apply plugin: 'org.mozilla.rust-android-gradle.rust-android'

tasks.whenTaskAdded { task ->
if ((task.name == 'javaPreCompileDebug' || task.name == 'javaPreCompileRelease')) {
task.dependsOn 'cargoBuild'
}
task fixNotCopyingRustJniLibs(type: Delete) {
delete layout.buildDirectory.dir("intermediates/merged_jni_libs")
}

project.afterEvaluate {
tasks.getByName("mergeDebugJniLibFolders").dependsOn("cargoBuild")
tasks.getByName("mergeReleaseJniLibFolders").dependsOn("cargoBuild")
tasks.getByName("cargoBuild").dependsOn("fixNotCopyingRustJniLibs")
}

cargo {
Expand Down
12 changes: 8 additions & 4 deletions examples/wallet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ android {

apply plugin: 'org.mozilla.rust-android-gradle.rust-android'

tasks.whenTaskAdded { task ->
if ((task.name == 'javaPreCompileDebug' || task.name == 'javaPreCompileRelease')) {
task.dependsOn 'cargoBuild'
}
task fixNotCopyingRustJniLibs(type: Delete) {
delete layout.buildDirectory.dir("intermediates/merged_jni_libs")
}

project.afterEvaluate {
tasks.getByName("mergeDebugJniLibFolders").dependsOn("cargoBuild")
tasks.getByName("mergeReleaseJniLibFolders").dependsOn("cargoBuild")
tasks.getByName("cargoBuild").dependsOn("fixNotCopyingRustJniLibs")
}

cargo {
Expand Down

0 comments on commit d9d79ad

Please sign in to comment.