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
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static def getGitHash() {
}

android {
compileSdk rootProject.androidCompileSdk
compileSdk = libs.versions.androidCompileSdk.get().toInteger()
sourceSets {
main {
proto {
Expand All @@ -75,8 +75,8 @@ android {
}
defaultConfig {
applicationId "org.groundplatform.android"
minSdkVersion rootProject.androidMinSdk
targetSdkVersion rootProject.androidTargetSdk
minSdkVersion libs.versions.androidMinSdk.get().toInteger()
targetSdkVersion libs.versions.androidTargetSdk.get().toInteger()

versionCode getGitCommitCount()
versionName "${getGitBranchName()}-${getGitHash()}-debug"
Expand Down Expand Up @@ -177,6 +177,7 @@ configurations {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':core:domain')
implementation libs.androidx.multidex
implementation libs.androidx.preference.ktx

Expand Down Expand Up @@ -371,7 +372,7 @@ apply plugin: 'androidx.navigation.safeargs'
apply plugin: 'com.google.gms.google-services'

kotlin {
jvmToolchain rootProject.jvmToolchainVersion
jvmToolchain libs.versions.jvmToolchainVersion.get().toInteger()
}

secrets {
Expand Down
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ plugins {
alias libs.plugins.hilt.android apply false
alias libs.plugins.detekt
alias libs.plugins.protobuf apply false
alias libs.plugins.kotlin.multiplatform apply false
alias libs.plugins.android.kotlin.multiplatform.library apply false
alias libs.plugins.android.lint apply false
alias libs.plugins.compose.multiplatform apply false
}

allprojects {
Expand Down Expand Up @@ -100,10 +104,3 @@ detekt {
tasks.register('checkCode', GradleBuild) {
tasks = ['checkstyle', 'lintLocalDebug', 'ktfmtCheck', 'detekt']
}

ext {
androidCompileSdk = 36
androidMinSdk = 24
androidTargetSdk = 36
jvmToolchainVersion = 17
}
1 change: 1 addition & 0 deletions core/domain/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions core/domain/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
}

kotlin {
// We do not add an Android target here because this is a pure domain module.
// Adding an Android target would require the Android Gradle Plugin (AGP) and SDK configuration,
// which would couple the domain layer to platform-specific infrastructure.
// iOS targets are included because Kotlin can compile to iOS without any platform plugin.
jvm()
jvmToolchain(libs.versions.jvmToolchainVersion.get().toInt())

iosX64()
iosArm64()
iosSimulatorArm64()

sourceSets {
commonMain {
dependencies {
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.serialization.json)
}
}

commonTest { dependencies { implementation(libs.kotlin.test) } }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.groundplatform.domain.model

import kotlinx.serialization.json.JsonObject

/** Represents the data collected for a specific LOI which can be downloaded and shared */
data class LoiReport(val geoJson: JsonObject)
1 change: 1 addition & 0 deletions core/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions core/ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.kotlin.multiplatform.library)
alias(libs.plugins.android.lint)
alias(libs.plugins.compose.multiplatform)
alias(libs.plugins.compose.compiler)
}

kotlin {
jvmToolchain(libs.versions.jvmToolchainVersion.get().toInt())
androidLibrary {
namespace = "org.groundplatform.core.ui"
compileSdk = libs.versions.androidCompileSdk.get().toInt()
minSdk = libs.versions.androidMinSdk.get().toInt()
}

val xcfName = "GroundUiKit"

listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach {
it.binaries.framework {
baseName = xcfName
isStatic = true
}
}

sourceSets {
commonMain {
dependencies {
implementation(libs.compose.runtime)
implementation(libs.compose.foundation)
implementation(libs.compose.material3)
implementation(libs.compose.ui)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.components.resources)
implementation(libs.androidx.lifecycle.runtime.compose)
implementation(libs.qrose)
}
}

commonTest { dependencies { implementation(libs.kotlin.test) } }

androidMain { dependencies {} }

iosMain { dependencies {} }
}
}

dependencies { androidRuntimeClasspath(libs.compose.ui.tooling) }
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright 2026 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.groundplatform.ui.components

import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.github.alexzhirkevich.qrose.rememberQrCodePainter

/**
* Displays a QR code generated from the given [content] string.
*
* The composable is intentionally generic, it accepts any string payload, making it reusable for
* GeoJSON, URLs, or any other data that fits within QR code capacity limits.
*/
@Composable
fun GroundQrCode(
modifier: Modifier = Modifier,
content: String,
contentDescription: String,
centerLogoPainter: Painter?,
) {
val qrcodePainter =
rememberQrCodePainter(data = content) {
if (centerLogoPainter != null) {
logo { painter = centerLogoPainter }
}
}

Image(painter = qrcodePainter, contentDescription = contentDescription, modifier = modifier)
}

@Preview
@Composable
private fun GroundQrCodePreview() {
MaterialTheme {
Surface {
GroundQrCode(
modifier = Modifier.padding(16.dp),
content = "https://www.google.com",
contentDescription = "Google",
centerLogoPainter = null,
)
}
}
}
10 changes: 5 additions & 5 deletions e2eTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ plugins {
android {
targetProjectPath ':app'
namespace = 'org.groundplatform.android.e2etest'
compileSdk rootProject.androidCompileSdk
compileSdk = libs.versions.androidCompileSdk.get().toInteger()

defaultConfig {
minSdkVersion rootProject.androidMinSdk
targetSdkVersion rootProject.androidTargetSdk
minSdkVersion libs.versions.androidMinSdk.get().toInteger()
targetSdkVersion libs.versions.androidTargetSdk.get().toInteger()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments clearPackageData: 'true'
}
Expand Down Expand Up @@ -80,5 +80,5 @@ dependencies {
}

kotlin {
jvmToolchain rootProject.jvmToolchainVersion
}
jvmToolchain libs.versions.jvmToolchainVersion.get().toInteger()
}
24 changes: 23 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@
# limitations under the License.

[versions]
androidCompileSdk = "36"
androidMinSdk = "24"
androidTargetSdk = "36"
androidMapsUtilsVersion = "4.1.0"
androidXLifecycleVersion = "2.9.6"
appcompatVersion = "1.7.1"
autoValueVersion = "1.11.1"
coilComposeVersion = "2.7.0"
composeBom = "2026.02.01"
composeMultiplatformVersion = "1.10.2"
constraintlayoutVersion = "2.2.1"
coreKtxVersion = "1.17.0"
coreTesting = "2.2.0"
Expand All @@ -35,6 +40,7 @@ groundPlatformVersion = "bc2596d"
gsonVersion = "2.13.2"
hiltJetpackVersion = "1.3.0"
hiltVersion = "2.59.2"
jvmToolchainVersion = "17"
jsonVersion = "20251224"
junitKtx = "1.3.0"
junitVersion = "4.13.2"
Expand All @@ -46,6 +52,7 @@ ktfmtVersion = "0.25.0"
lifecycleVersion = "2.10.0"
markdownVersion = "0.7.3"
materialVersion = "1.13.0"
material3Version = "1.9.0"
mockitoBom = "5.22.0"
mockitoInlineVersion = "5.2.0"
mockitoKotlinVersion = "6.2.3"
Expand All @@ -60,6 +67,7 @@ playServicesOssLicensesVersion = "17.4.0"
preferenceKtx = "1.2.1"
protobufKotlinLiteVersion = "4.26.1"
protobufVersion = "0.9.6"
qroseVersion = "1.1.2"
robolectricVersion = "4.16.1"
roomVersion = "2.8.4"
secretsGradlePluginVersion = "2.0.1"
Expand Down Expand Up @@ -149,7 +157,7 @@ kotlinx-coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bo
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test" }
kotlinx-serialization-bom = { module = "org.jetbrains.kotlinx:kotlinx-serialization-bom", version.ref = "kotlinxBom" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxBom" }
kotlinx-serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf" }
markdown = { module = "org.jetbrains:markdown", version.ref = "markdownVersion" }
material = { module = "com.google.android.material:material", version.ref = "materialVersion" }
Expand All @@ -171,9 +179,20 @@ testing = { module = "com.jraska.livedata:testing", version.ref = "testingVersio
timber = { module = "com.jakewharton.timber:timber", version.ref = "timberVersion" }
truth = { module = "com.google.truth:truth", version.ref = "truthVersion" }
turbine = { module = "app.cash.turbine:turbine", version.ref = "turbineVersion" }
#Multiplatform
androidx-lifecycle-runtime-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidXLifecycleVersion" }
compose-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatformVersion" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "composeMultiplatformVersion" }
compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3Version" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "composeMultiplatformVersion" }
compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatformVersion" }
compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "composeMultiplatformVersion" }
compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatformVersion" }
qrose = { module = "io.github.alexzhirkevich:qrose", version.ref = "qroseVersion" }

[plugins]
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVersion" }
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatformVersion" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinVersion" }
ksp = { id = "com.google.devtools.ksp", version.ref = "kspVersion" }
Expand All @@ -182,3 +201,6 @@ hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hiltVersi
detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detektVersion" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufVersion" }
room = { id = "androidx.room", version.ref = "roomVersion" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlinVersion" }
android-kotlin-multiplatform-library = { id = "com.android.kotlin.multiplatform.library", version.ref = "gradleVersion" }
android-lint = { id = "com.android.lint", version.ref = "gradleVersion" }
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ plugins {
}

include ':app', ':e2eTest'
include ':core:ui'
include ':core:domain'
Loading