diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index ff4d77e56..99747858a 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -15,6 +15,7 @@
* along with this program. If not, see .
*/
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.io.FileInputStream
import java.util.Properties
@@ -131,13 +132,6 @@ android {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_21.toString()
- freeCompilerArgs += listOf(
- "-opt-in=kotlin.RequiresOptIn",
- "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
- )
- }
lint {
abortOnError = false
disable.add("MissingTranslation")
@@ -148,6 +142,18 @@ android {
}
}
+kotlin {
+ compilerOptions {
+ jvmTarget = JvmTarget.JVM_21 // match Java 21
+ freeCompilerArgs.addAll(
+ "-opt-in=kotlin.RequiresOptIn",
+ "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
+ "-Xcontext-receivers",
+ "-Xannotation-default-target=param-property"
+ )
+ }
+}
+
// per protobuf-gradle-plugin docs, this is recommended for android
protobuf {
protoc {
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index f77d3f90c..c4b0dddf2 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -14,7 +14,7 @@ core-splashscreen = "1.0.1"
crashlytics = "3.0.4"
datastore = "1.1.7"
detekt = "1.23.8"
-devtools-ksp = "2.1.21-2.0.2"
+devtools-ksp = "2.2.0-2.0.2"
emoji2 = "1.5.0"
espresso-core = "3.6.1"
firebase-bom = "33.15.0"
diff --git a/mesh_service_example/build.gradle.kts b/mesh_service_example/build.gradle.kts
index d6ef127ac..302b998d5 100644
--- a/mesh_service_example/build.gradle.kts
+++ b/mesh_service_example/build.gradle.kts
@@ -1,3 +1,22 @@
+/*
+ * Copyright (c) 2025 Meshtastic LLC
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+
/*
* Copyright (c) 2025 Meshtastic LLC
*
@@ -52,14 +71,17 @@ android {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
- kotlinOptions {
- jvmTarget = "11" // match Java 11
- }
buildFeatures {
aidl = true
}
}
+kotlin {
+ compilerOptions {
+ jvmTarget = JvmTarget.JVM_11 // match Java 11
+ }
+}
+
// per protobuf-gradle-plugin docs, this is recommended for android
protobuf {
protoc {