From d9d79ad68bdebe2e968c1ab4c72580aa3d8d31a5 Mon Sep 17 00:00:00 2001 From: Daniel Leping Date: Sat, 25 Feb 2023 20:35:11 +0000 Subject: [PATCH] updated config for gradle 7.5 --- examples/app/build.gradle | 12 ++++++++---- examples/wallet/build.gradle | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/examples/app/build.gradle b/examples/app/build.gradle index 31302cb..5ce9f6c 100644 --- a/examples/app/build.gradle +++ b/examples/app/build.gradle @@ -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 { diff --git a/examples/wallet/build.gradle b/examples/wallet/build.gradle index c56845b..566fc27 100644 --- a/examples/wallet/build.gradle +++ b/examples/wallet/build.gradle @@ -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 {