Skip to content
Open
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
20 changes: 15 additions & 5 deletions Android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,21 @@ plugins {
alias(libs.plugins.kotlinter)
}

val keystore = Properties()
.also { it.load(FileInputStream(project.file("keystore.properties"))) }
val keystoreFile = project.file("keystore.properties")
val keystore = Properties().apply {
if (keystoreFile.exists()) {
FileInputStream(keystoreFile).use(::load)
}
}
val hasReleaseSigning = listOf("storeFile", "storePassword", "keyAlias", "keyPassword")
.all { keystore[it] != null }

android {
compileSdk = 35
compileSdk = 36
defaultConfig {
applicationId = "com.conradkramer.wallet.android"
minSdk = 28
targetSdk = 35
targetSdk = 36
versionCode = 1
versionName = "0.1"
}
Expand All @@ -32,7 +38,11 @@ android {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
signingConfig = signingConfigs.getByName("release")
signingConfig = if (hasReleaseSigning) {
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("debug")
}
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
Expand Down
14 changes: 10 additions & 4 deletions Shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import app.cash.sqldelight.core.capitalize
import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jmailen.gradle.kotlinter.tasks.FormatTask
import org.jmailen.gradle.kotlinter.tasks.LintTask
Expand Down Expand Up @@ -30,6 +29,7 @@ kotlin {
languageSettings.apply {
optIn("kotlin.experimental.ExperimentalObjCName")
optIn("kotlin.experimental.ExperimentalForeignApi")
optIn("kotlin.time.ExperimentalTime")
}
}

Expand Down Expand Up @@ -135,7 +135,7 @@ kotlin {
}

android {
compileSdk = 35
compileSdk = 36
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 28
Expand All @@ -162,8 +162,14 @@ dependencies {
.forEach { add(it, libs.koin.ksp) }
}

project.tasks.withType(KotlinCompilationTask::class.java).configureEach {
if(name != "kspCommonMainKotlinMetadata") {
tasks.withType<KotlinCompilationTask<*>>().configureEach {
if (name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
}

tasks.configureEach {
if (name.startsWith("ksp") && name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import com.conradkramer.wallet.sql.Database
import io.github.oshai.kotlinlogging.KLogger
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlinx.datetime.Clock
import kotlin.time.Clock
import kotlin.time.ExperimentalTime

@OptIn(ExperimentalTime::class)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Clock Import Error Causes Compilation Failure

The import changed from kotlinx.datetime.Clock to kotlin.time.Clock, but the code still uses Clock.System.now(). kotlin.time.Clock lacks the System property and is for measuring elapsed time, not current timestamps. This will cause a compilation error, as database operations expect kotlinx.datetime.Instant types.

Fix in Cursor Fix in Web

internal class CoinbaseIndexer(
private val scope: CoroutineScope,
private val currencyCode: Currency.Code,
Expand Down
22 changes: 22 additions & 0 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,25 @@ Open the Xcode project (`Apple/Wallet.xcodeproj`) and build and run the app usin
In order to build for Android, you will need to download [Android Studio](https://developer.android.com/studio).

Open the repository in Android Studio and build and run the app using the `Android` configuration.

If you are building from the command line (for example to run `./gradlew test` or `./gradlew :Android:assembleRelease`), install
the Android command-line tools and point the build at them via `ANDROID_SDK_ROOT`:

```bash
mkdir -p "$HOME/android-sdk"
cd "$HOME/android-sdk"
curl -L -o commandlinetools-linux.zip \
https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip commandlinetools-linux.zip -d cmdline-tools-temp
mkdir -p cmdline-tools/latest
mv cmdline-tools-temp/cmdline-tools/* cmdline-tools/latest/
rm -rf cmdline-tools-temp commandlinetools-linux.zip

export ANDROID_SDK_ROOT="$HOME/android-sdk"
yes | "$ANDROID_SDK_ROOT"/cmdline-tools/latest/bin/sdkmanager --licenses
"$ANDROID_SDK_ROOT"/cmdline-tools/latest/bin/sdkmanager \
"platform-tools" "platforms;android-36" "build-tools;35.0.0"
```

With the SDK installed, set `ANDROID_SDK_ROOT` in your shell before invoking Gradle so that the Android plugins can locate the
platform and build tools.
46 changes: 23 additions & 23 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
[versions]
android = "8.8.0"
androidx-appcompat = "1.7.0"
android = "8.13.0"
androidx-appcompat = "1.7.1"
androidx-biometric = "1.4.0-alpha02"

Check warning on line 4 in gradle/libs.versions.toml

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Gradle Dependency: A newer version of androidx.biometric:biometric than 1.4.0-alpha02 is available: 1.4.0-alpha04
androidx-activity = "1.10.0"
androidx-navigation = "2.8.6"
bouncycastle = "1.80"
compose-foundation = "1.7.7"
compose-material3 = "1.3.1"
compose-ui = "1.7.7"
material = "1.12.0"
dbtools-room = "7.0.1"
androidx-activity = "1.11.0"
androidx-navigation = "2.9.5"
bouncycastle = "1.82"
compose-foundation = "1.7.8"

Check warning on line 8 in gradle/libs.versions.toml

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Gradle Dependency: Upgrade `androidx.compose.foundation` for keyboard and mouse support
compose-material3 = "1.4.0"
compose-ui = "1.7.8"

Check warning on line 10 in gradle/libs.versions.toml

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Gradle Dependency: A newer version of androidx.compose.ui:ui-tooling-preview than 1.7.8 is available: 1.9.3

Check warning on line 10 in gradle/libs.versions.toml

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Gradle Dependency: A newer version of androidx.compose.ui:ui-tooling than 1.7.8 is available: 1.9.3

Check warning on line 10 in gradle/libs.versions.toml

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Gradle Dependency: A newer version of androidx.compose.ui:ui than 1.7.8 is available: 1.9.3
material = "1.13.0"
dbtools-room = "8.3.0"
java = "21"
koin = "4.0.2"
koin-annotations = "2.0.0-RC1"
kotlin = "2.1.10"
kotlin-logging = "7.0.3"
kotlinx-coroutines = "1.10.1"
kotlinx-datetime = "0.6.1"
kotlinx-serialization = "1.8.0"
kotlinter = "5.0.1"
ksp = "2.1.10-1.0.29"
ktor = "3.0.3"
sqldelight = "2.0.2"
sl4f-android = "2.0.16-0"
native-coroutines = "1.0.0-ALPHA-38"
koin = "4.1.1"
koin-annotations = "2.2.0"
kotlin = "2.2.20"
kotlin-logging = "7.0.13"
kotlinx-coroutines = "1.10.2"
kotlinx-datetime = "0.7.1"
kotlinx-serialization = "1.9.0"
kotlinter = "5.2.0"
ksp = "2.2.20-2.0.4"
ktor = "3.3.1"
sqldelight = "2.1.0"
sl4f-android = "2.0.17-0"
native-coroutines = "1.0.0-ALPHA-47"

[libraries]
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jan 31 13:57:31 PST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip

Check warning on line 4 in gradle/wrapper/gradle-wrapper.properties

View workflow job for this annotation

GitHub Actions / Android Lint

Obsolete Android Gradle Plugin Version: A newer version of Gradle than 8.13 is available: 8.14.3
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading