Skip to content

Commit

Permalink
Fix gradle rust android plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Jan 10, 2025
1 parent b583cb8 commit ebc05d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/android-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ jobs:
${{ matrix.assemble-command }}
-x cargoBuild
-x generateRelayList
-x mergeOssProdDebugJniLibFolders
-x mergePlayStagemoleDebugJniLibFolders
gradle-version: wrapper
build-root-directory: android
execution-only-caches: false
Expand Down
6 changes: 5 additions & 1 deletion android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ val repoRootPath = rootProject.projectDir.absoluteFile.parentFile.absolutePath
val extraAssetsDirectory = layout.buildDirectory.dir("extraAssets").get()
val relayListPath = extraAssetsDirectory.file("relays.json").asFile
val defaultChangelogAssetsDirectory = "$repoRootPath/android/src/main/play/release-notes/"
val rustJniLibsDir = layout.buildDirectory.dir("rustJniLibs/android").get()

val credentialsPath = "${rootProject.projectDir}/credentials"
val keystorePropertiesFile = file("$credentialsPath/keystore.properties")
Expand Down Expand Up @@ -239,7 +240,10 @@ android {
tasks["merge${capitalizedVariantName}Assets"].dependsOn(tasks["generateRelayList"])

// Ensure that we have all the JNI libs before merging them.
tasks["merge${capitalizedVariantName}JniLibFolders"].dependsOn("cargoBuild")
tasks["merge${capitalizedVariantName}JniLibFolders"].apply {
inputs.dir(rustJniLibsDir)
dependsOn("cargoBuild")
}

// Ensure all relevant assemble tasks depend on our ensure task.
tasks["assemble$capitalizedVariantName"].dependsOn(tasks["ensureValidVersionCode"])
Expand Down

0 comments on commit ebc05d1

Please sign in to comment.