Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 29 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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))
}
}
}

Expand Down
6 changes: 5 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE"
tools:ignore="ForegroundServicePermission,ForegroundServicesPolicy" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<!-- Required for E2E tests connecting to local Electrum server (Android 16+) -->
<uses-permission
Expand All @@ -28,6 +30,8 @@
<application
android:name=".App"
android:allowBackup="false"
android:fullBackupContent="@xml/backup_rules"
android:dataExtractionRules="@xml/data_extraction_rules"
android:icon="${app_icon}"
android:label="@string/app_name"
android:roundIcon="${app_icon_round}"
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/xml/backup_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude domain="root" path="." />
<exclude domain="file" path="." />
<exclude domain="database" path="." />
<exclude domain="sharedpref" path="." />
<exclude domain="external" path="." />
</full-backup-content>
9 changes: 9 additions & 0 deletions app/src/main/res/xml/data_extraction_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<data-extraction-rules>
<cloud-backup>
<!-- Empty section = nothing backed up to cloud -->
</cloud-backup>
<device-transfer>
<!-- Empty section = nothing transferred device-to-device -->
</device-transfer>
</data-extraction-rules>
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down
Loading