diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 30ab6976f..120a90e2f 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -57,7 +57,7 @@ jobs: - name: Rename APK run: | - apk=$(find app/build/outputs/apk/dev/debug -name 'bitkit-android-*-devDebug.apk') + apk=$(find app/build/outputs/apk/dev/debug -name 'bitkit-dev-debug-*-universal.apk') mv "$apk" app/build/outputs/apk/dev/debug/bitkit_e2e.apk - name: Upload APK diff --git a/.github/workflows/e2e_migration.yml b/.github/workflows/e2e_migration.yml index a62313be2..c17d59044 100644 --- a/.github/workflows/e2e_migration.yml +++ b/.github/workflows/e2e_migration.yml @@ -53,7 +53,7 @@ jobs: - name: Rename APK run: | - apk=$(find app/build/outputs/apk/dev/debug -name 'bitkit-android-*-devDebug.apk') + apk=$(find app/build/outputs/apk/dev/debug -name 'bitkit-dev-debug-*-universal.apk') mv "$apk" app/build/outputs/apk/dev/debug/bitkit_e2e.apk - name: Upload APK diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7327c78bb..5c3f39847 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,5 @@ import com.android.build.gradle.internal.api.BaseVariantOutputImpl +import com.android.build.gradle.internal.tasks.FinalizeBundleTask import io.gitlab.arturbosch.detekt.Detekt import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent @@ -54,8 +55,8 @@ android { applicationId = "to.bitkit" minSdk = 28 targetSdk = 36 - versionCode = 172 - versionName = "2.0.0-rc.6" + versionCode = 174 + versionName = "2.0.0" testInstrumentationRunner = "to.bitkit.test.HiltTestRunner" vectorDrawables { useSupportLibrary = true @@ -163,6 +164,16 @@ android { excludes += "META-INF/versions/9/OSGI-INF/MANIFEST.MF" } } + splits { + abi { + isEnable = true + reset() + // Only architectures supported by native libs (ldk-node, bitkit-core) + // x86 not supported; x86_64 only for debug/emulator + include("armeabi-v7a", "arm64-v8a") + isUniversalApk = true + } + } testOptions { unitTests { isReturnDefaultValues = true // mockito @@ -174,12 +185,27 @@ android { } applicationVariants.all { val variant = this + val bitkit = "bitkit" + val flavorName = variant.flavorName + val variantName = variant.buildType.name + val versionCode = defaultConfig.versionCode outputs .map { it as BaseVariantOutputImpl } .forEach { output -> - val apkName = "bitkit-android-${defaultConfig.versionCode}-${variant.name}.apk" + val abi = output.getFilter("ABI") ?: "universal" + val apkName = "$bitkit-$flavorName-$variantName-$versionCode-$abi.apk" output.outputFileName = apkName } + + // Rename AAB bundle + tasks.named( + "sign${variant.name.replaceFirstChar { it.uppercase() }}Bundle", + FinalizeBundleTask::class.java, + ) { + val aabName = "$bitkit-$flavorName-$variantName-$versionCode.aab" + val outputDir = finalBundleFile.asFile.get().parentFile + finalBundleFile.set(File(outputDir, aabName)) + } } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 632dd54e0..ebcf34f04 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,9 @@ - + + + + + + + + diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 000000000..373e59114 --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f0021b9ef..9962b072b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -58,7 +58,7 @@ ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktor" } ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" } ktor-serialization-kotlinx-json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" } -ldk-node-android = { module = "com.github.synonymdev.ldk-node:ldk-node-android", version = "v0.7.0-rc.17" } +ldk-node-android = { module = "com.github.synonymdev.ldk-node:ldk-node-android", version = "v0.7.0-rc.18" } lifecycle-process = { group = "androidx.lifecycle", name = "lifecycle-process", version.ref = "lifecycle" } lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle" } lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle" }