Skip to content
Draft
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
16 changes: 8 additions & 8 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
with:
submodules: true

- name: set up JDK 17
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand Down Expand Up @@ -58,10 +58,10 @@ jobs:
with:
submodules: true

- name: set up JDK 17
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand Down Expand Up @@ -104,10 +104,10 @@ jobs:
with:
submodules: true

- name: set up JDK 17
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand Down Expand Up @@ -151,10 +151,10 @@ jobs:
with:
submodules: true

- name: set up JDK 17
- name: set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
cache: gradle

Expand Down
5 changes: 5 additions & 0 deletions android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ Or, to use GraphHopper for the routing:
graphhopperApiKey=YOUR-API-KEY
```

## Snapshot tests

We use Paparazzi for UI snapshot testing.
To update the snapshots, run `./gradlew recordPaparazziDebug`.

## Testing locally in a separate project

* Bump the version number to a `SNAPSHOT` in `build.gradle`.
Expand Down
13 changes: 13 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import org.gradle.api.Project
import org.gradle.process.ExecOperations

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias libs.plugins.androidApplication apply false
Expand All @@ -11,6 +14,16 @@ plugins {
alias libs.plugins.kotlinSerialization apply false
}

// Gradle 9 removed `Project.exec(Closure)`; some third-party plugins still call it.
// Provide a compatibility shim backed by `ExecOperations`.
gradle.beforeProject { Project p ->
if (!p.metaClass.respondsTo(p, "exec", Closure)) {
p.metaClass.exec = { Closure c ->
p.services.get(ExecOperations).exec(c)
}
}
}

ext {
SKIP_SIGNING_PROPERTY = "skip.signing"
}
Expand Down
2 changes: 1 addition & 1 deletion android/composeui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {

android {
namespace 'com.stadiamaps.ferrostar.composeui'
compileSdk 35
compileSdk = 36

defaultConfig {
minSdk 25
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions android/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ plugins {

android {
namespace 'com.stadiamaps.ferrostar.core'
compileSdk 35
compileSdk = 36
ndkVersion "26.2.11394342"

defaultConfig {
minSdk 25
targetSdk 35

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
Expand All @@ -31,6 +30,12 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
lint {
targetSdk 36
}
testOptions {
targetSdk 36
}
}

dependencies {
Expand Down Expand Up @@ -94,7 +99,9 @@ android.libraryVariants.all { variant ->
}

def sourceSet = variant.sourceSets.find { it.name == variant.name }
sourceSet.java.srcDir layout.buildDirectory.file("generated/source/uniffi/${variant.name}/java")
// AGP 9 disallows adding Provider instances to the legacy SourceSet API.
// Use a concrete directory here to keep configuration compatible.
sourceSet.java.srcDir bDir.asFile

// UniFFI tutorial notes that they made several attempts like this but were unsuccessful coming
// to a good solution for forcing the directory to be marked as generated (short of checking in
Expand Down
4 changes: 2 additions & 2 deletions android/demo-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ plugins {

android {
namespace 'com.stadiamaps.ferrostar'
compileSdk 35
compileSdk = 36

defaultConfig {
applicationId "com.stadiamaps.ferrostar.demo"
minSdk 26
targetSdk 35
targetSdk 36
versionCode 1
versionName "1.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.stadiamaps.ferrostar

import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
Expand All @@ -19,6 +20,7 @@ import uniffi.ferrostar.UserLocation
import uniffi.ferrostar.Waypoint
import uniffi.ferrostar.WaypointKind

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun AutocompleteOverlay(
modifier: Modifier = Modifier,
Expand Down
2 changes: 1 addition & 1 deletion android/google-play-services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

android {
namespace 'com.stadiamaps.ferrostar.googleplayservices'
compileSdk 35
compileSdk = 36

defaultConfig {
minSdk 25
Expand Down
12 changes: 11 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,14 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.resvalues=true
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
android.enableAppCompileTimeRClass=false
android.usesSdkInManifest.disallowed=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.r8.optimizedResourceShrinking=false
android.builtInKotlin=false
android.newDsl=false
26 changes: 13 additions & 13 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
[versions]
agp = "8.13.0"
agp = "9.0.0"
kotlin = "2.2.21"
cargo-ndk = "0.3.4"
ktfmt = "0.21.0" # 0.22.0 -> https://github.com/cortinico/ktfmt-gradle/issues/413
androidx-lifecycle = "2.9.4"
paparazzi = "1.3.5"
androidx-lifecycle = "2.10.0"
paparazzi = "2.0.0-alpha04"
desugar_jdk_libs = "2.1.5"
ktx = "1.16.0"
ktx = "1.17.0"
kotlinx-coroutines = "1.10.2"
kotlinx-datetime = "0.7.0"
kotlinx-serialization = "1.8.1"
kotlinx-datetime = "0.7.1"
kotlinx-serialization = "1.10.0"
androidx-appcompat = "1.7.1"
androidx-activity-compose = "1.10.1"
compose = "2025.06.01"
okhttp = "5.0.0"
androidx-activity-compose = "1.12.3"
compose = "2026.01.01"
okhttp = "5.3.2"
maplibre-compose = "1.2.0"
playServicesLocation = "21.3.0"
junit = "4.13.2"
junitVersion = "1.3.0"
junitCompose = "1.10.0"
junitCompose = "1.10.2"
espressoCore = "3.7.0"
okhttp-mock = "2.1.0"
mockk = "1.14.5"
mockk = "1.14.9"
turbine = "1.2.1"
mavenPublish = "0.33.0"
material = "1.12.0"
stadiaAutocompleteSearch = "2.0.0"
material = "1.13.0"
stadiaAutocompleteSearch = "3.0.0"

[libraries]
desugar_jdk_libs = { module = "com.android.tools:desugar_jdk_libs", version.ref = "desugar_jdk_libs" }
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jul 14 13:32:53 PDT 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion android/maplibreui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ plugins {

android {
namespace 'com.stadiamaps.ferrostar.maplibreui'
compileSdk 35
compileSdk = 36

defaultConfig {
minSdk 25
Expand Down
Loading