Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
b9e2c1c
Resolves #185 and adds few improvements to the android/build script.
advanpix Nov 9, 2025
9796fc1
Fixed the incorrect reference to mosaik version in main build script
advanpix Nov 9, 2025
d8d36e8
Fixed ergo-appkit dependency in common-jvm/buid script. Newer version…
advanpix Nov 9, 2025
a4dc4ea
Updates for compatibility with ergo-appkit_2.11:5.0.3 and minor chang…
advanpix Nov 9, 2025
f22b121
Regenerated gradle/verification-metadata.xml file to reflect new pack…
advanpix Nov 9, 2025
9408758
Transition to newer version of Kotlin, gradle, AGP, compose and other…
advanpix Nov 10, 2025
8972568
Fixed incompatibility with missing zxing_button_ok in new version of …
advanpix Nov 10, 2025
cf6015d
Cleaned up build.gradle in common-jvm gradle. Removed Java 1.7 specif…
advanpix Nov 11, 2025
0c5ed52
Fixed status bar overlap on Android 15
advanpix Nov 11, 2025
3f71fac
Added aapt2 to trusted packages
advanpix Nov 11, 2025
6fff9e8
Updated workflow to use JDK 17 instead of JDK 11
advanpix Nov 11, 2025
43c6efe
Updated workflow to enable manual dispatch for testing in forked repo…
advanpix Nov 12, 2025
8abf490
Added junit-bom to trusted packages
advanpix Nov 12, 2025
ce6ad1d
Updated list of verified packages
advanpix Nov 12, 2025
1c06672
Updated verification-metadata.xml
advanpix Nov 12, 2025
04bc93e
Updated list of verified packages with desktop-jvm-linux-x64
advanpix Nov 12, 2025
3daabe2
Fixed Retrofit call adapter failure in release build
advanpix Nov 23, 2025
128ed26
Fixed Gson deserialization failure in release build
advanpix Nov 23, 2025
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
5 changes: 3 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- master
- develop
workflow_dispatch: {}

jobs:
build:
Expand All @@ -16,10 +17,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
47 changes: 28 additions & 19 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ plugins {
}

android {
compileSdkVersion 33
buildToolsVersion "33.0.1"
namespace 'org.ergoplatform.android'
compileSdk 35

defaultConfig {
applicationId "org.ergoplatform.android"
minSdkVersion 24
targetSdkVersion 33
versionCode 2305
versionName "2.4.2305"
minSdk 24
targetSdk 35
versionCode 2511
versionName "2.4.2511"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildFeatures {
compose true
viewBinding true
buildConfig true
}

buildTypes {
Expand Down Expand Up @@ -51,22 +53,24 @@ android {
}
}

buildFeatures {
viewBinding true
}

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
}

composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion kotlin_version
kotlinCompilerExtensionVersion "1.4.2"
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}

Expand Down Expand Up @@ -105,7 +109,7 @@ dependencies {
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.work:work-runtime-ktx:$work_version"

implementation('com.journeyapps:zxing-android-embedded:4.2.0')
implementation('com.journeyapps:zxing-android-embedded:4.3.0')

// newer okhttp version than pulled from dependencies to avoid StrictMode policy violation
// defined here because causing errors on iOS
Expand All @@ -116,12 +120,17 @@ dependencies {
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

// Compose
implementation "androidx.compose.runtime:runtime:$compose_version"
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.foundation:foundation:$compose_version"
implementation "androidx.compose.foundation:foundation-layout:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"

// 1.3.1, Kotlin 1.8.10
// https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.3.1
implementation "androidx.compose.compiler:compiler:1.4.2"
implementation "androidx.compose.runtime:runtime:1.3.3"
implementation "androidx.compose.runtime:runtime-livedata:1.3.3"
implementation "androidx.compose.ui:ui:1.3.3"
implementation "androidx.compose.foundation:foundation:1.3.1"
implementation "androidx.compose.foundation:foundation-layout:1.3.1"
implementation "androidx.compose.material:material:1.3.1"

implementation "com.github.MrStahlfelge.mosaik:common-compose:$mosaik_version"

testImplementation 'junit:junit:4.13.2'
Expand Down
58 changes: 47 additions & 11 deletions android/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,72 @@
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
# public *;
#}

# If you keep the line number information, uncomment this to
# hide the original source file name.
-renamesourcefileattribute SourceFile

# Essential rules for Retrofit to keep generic type signatures and classes
-keepattributes Signature
-keepattributes InnerClasses
-keepattributes EnclosingMethod
-keepattributes Exceptions

-dontwarn retrofit2.**
-keep class retrofit2.** { *; }

-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response

-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
-dontwarn okhttp3.**
-dontwarn okio.**

# GSON/Converter rules
-keep class com.google.gson.reflect.TypeToken
-keep class * extends com.google.gson.reflect.TypeToken
-keep class sun.misc.Unsafe { *; }

# Kotlin Data Class rules
-keepclassmembers class * {
java.lang.Object component1();
java.lang.Object component2();
java.lang.Object copy(...);
void <init>(...);
}

# Your existing project-specific rules start here

-dontwarn javax.annotation.Nullable
-dontwarn javax.annotation.ParametersAreNonnullByDefault

-keep class com.google.gson.**
-keep class org.ergoplatform.api.**
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
@com.google.gson.annotations.SerializedName <fields>;
}

-keep class org.ergoplatform.explorer.client.model.** { *; }
-keepclasseswithmembers class org.ergoplatform.explorer.client.model.** {
<init>(...);
}

-keep class sigmastate.** { *; }
-keep class sigma.** { *; }
-keep class scalan.** { *; }
-keep class special.** { *; }
-keep class wrappers.** { *; }
-keep class org.ergoplatform.restapi.** { *; }
-keep class org.ergoplatform.mosaik.model.** { *; }
-keep class org.ergoplatform.appkit.** { *; }
-keep class sigmastate.** { *; }
-keep class sigma.** { *; }
-keep class scalan.** { *; }
-keep class special.** { *; }
-keep class wrappers.** { *; }
-keep class org.ergoplatform.restapi.** { *; }
-keep class org.ergoplatform.mosaik.model.** { *; }
-keep class org.ergoplatform.appkit.** { *; }
-keep class scorex.util.encode.** { *; }
-keep class scala.util.control.** { *; }
-keep class scala.collection.** { *; }
Expand Down
3 changes: 1 addition & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.ergoplatform.android">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class MainActivity : AppCompatActivity() {
presentUserMessage = {
MaterialAlertDialogBuilder(this)
.setMessage(it)
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class DisplayCurrencyListDialogFragment : BottomSheetDialogFragment() {
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val currency = items.get(position)
holder.text.text =
if (currency.isEmpty()) getString(R.string.label_none) else currency.toUpperCase(
if (currency.isEmpty()) getString(R.string.label_none) else currency.uppercase(
Locale.getDefault()
)
holder.text.setOnClickListener { onChooseCurrency(currency) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AddressTransactionsFragment : Fragment(), AddressChooserCallback {
num?.let {
MaterialAlertDialogBuilder(requireContext())
.setMessage(getString(R.string.info_export, num))
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class SendFundsFragment : SubmitTransactionFragment(), ChooseAddressDialogCallba
viewModel.errorMessageLiveData.observe(viewLifecycleOwner, {
MaterialAlertDialogBuilder(requireContext())
.setMessage(it)
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
})
viewModel.txId.observe(viewLifecycleOwner, {
Expand Down Expand Up @@ -505,7 +505,7 @@ class SendFundsFragment : SubmitTransactionFragment(), ChooseAddressDialogCallba
viewModel.uiLogic.getPaymentRequestWarnings(AndroidStringProvider(requireContext()))?.let {
MaterialAlertDialogBuilder(requireContext())
.setMessage(it)
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package org.ergoplatform.android.transactions
import android.content.Intent
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -46,7 +47,7 @@ class SigningPromptDialogFragment : BottomSheetDialogFragment() {
ViewPager2.OnPageChangeCallback() {
override fun onPageSelected(position: Int) {
super.onPageSelected(position)
Handler().post { refreshButtonState() }
Handler(Looper.getMainLooper()).post { refreshButtonState() }
}
})
binding.buttonScanSignedTx.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TransactionInfoFragment : Fragment() {
MaterialAlertDialogBuilder(context)
.setMessage(R.string.info_cancel_tx)
.setPositiveButton(
R.string.zxing_button_ok
android.R.string.ok
) { _, _ ->
viewModel.doCancelTx(
AppDatabase.getInstance(context).walletDbProvider,
Expand Down Expand Up @@ -138,7 +138,7 @@ class TransactionInfoFragment : Fragment() {
if (!prompt.success)
MaterialAlertDialogBuilder(requireContext())
.setMessage(prompt.errorMsg!!)
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
else {
val walletConfigAndDerivedIdx = viewModel.walletConfigAndDerivedIdx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.ergoplatform.SigningSecrets
import org.ergoplatform.android.R
import org.ergoplatform.api.AesEncryptionManager
import org.ergoplatform.api.AndroidEncryptionManager
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString
import org.ergoplatform.persistance.ENC_TYPE_DEVICE
import org.ergoplatform.persistance.ENC_TYPE_PASSWORD
import org.ergoplatform.persistance.WalletConfig
Expand Down Expand Up @@ -61,7 +61,7 @@ abstract class AbstractAuthenticationFragment : Fragment(), PasswordDialogCallba
private fun showBiometricPromptError(errorMessage: String) {
MaterialAlertDialogBuilder(requireContext())
.setMessage(getString(R.string.error_device_security, errorMessage))
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import org.ergoplatform.URL_FORGOT_PASSWORD_HELP
import org.ergoplatform.android.R
import org.ergoplatform.android.databinding.FragmentPasswordDialogBinding
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString

const val ARG_SHOW_CONFIRMATION = "ARG_SHOW_CONFIRMATION"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.ergoplatform.android.R
import org.ergoplatform.android.databinding.FragmentConfirmCreateWalletBinding
import org.ergoplatform.android.ui.FullScreenFragmentDialog
import org.ergoplatform.android.ui.navigateSafe
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString
import org.ergoplatform.uilogic.wallet.ConfirmCreateWalletUiLogic

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.ergoplatform.android.wallet

import androidx.lifecycle.ViewModel
import org.ergoplatform.appkit.Mnemonic
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString

class CreateWalletViewModel : ViewModel() {
private var _mnemonic: SecretString? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.ergoplatform.android.databinding.FragmentSaveWalletDialogBinding
import org.ergoplatform.android.ui.*
import org.ergoplatform.api.AesEncryptionManager
import org.ergoplatform.api.AndroidEncryptionManager
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString
import org.ergoplatform.persistance.ENC_TYPE_DEVICE
import org.ergoplatform.persistance.ENC_TYPE_PASSWORD

Expand Down Expand Up @@ -166,7 +166,7 @@ class SaveWalletFragmentDialog : FullScreenFragmentDialog(), PasswordDialogCallb
private fun showSecurityErrorSnackbar(t: Throwable) {
MaterialAlertDialogBuilder(requireContext())
.setMessage(getString(R.string.error_device_security_save_wallet, t.message))
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.coroutines.launch
import org.ergoplatform.ApiServiceManager
import org.ergoplatform.android.AppDatabase
import org.ergoplatform.android.Preferences
import org.ergoplatform.appkit.SecretString
import org.ergoplatform.sdk.SecretString
import org.ergoplatform.uilogic.wallet.SaveWalletUiLogic

class SaveWalletViewModel : ViewModel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class WalletDetailsFragment : Fragment(), AddressChooserCallback {
},
showErrorMessage = {
MaterialAlertDialogBuilder(requireContext()).setMessage(it)
.setPositiveButton(R.string.zxing_button_ok, null)
.setPositiveButton(android.R.string.ok, null)
.show()
})
}
Expand Down
1 change: 1 addition & 0 deletions android/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">?attr/colorSurface</item>
<item name="android:windowLightStatusBar">@bool/isLight</item>
<item name="android:windowOptOutEdgeToEdgeEnforcement" tools:targetApi="35">true</item>

<!-- Buttons -->
<item name="borderlessButtonStyle">@style/Widget.App.Button.TextButton</item>
Expand Down
Loading
Loading