File tree Expand file tree Collapse file tree 6 files changed +19
-4
lines changed
convention/src/main/kotlin
com/google/samples/apps/nowinandroid Expand file tree Collapse file tree 6 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 1717import com.google.samples.apps.nowinandroid.configureGraphTasks
1818import org.gradle.api.Plugin
1919import org.gradle.api.Project
20+ import org.gradle.api.configuration.BuildFeatures
21+ import javax.inject.Inject
22+
23+ abstract class RootPlugin : Plugin <Project > {
24+ @get:Inject abstract val buildFeatures: BuildFeatures
2025
21- class RootPlugin : Plugin <Project > {
2226 override fun apply (target : Project ) {
2327 require(target.path == " :" )
24- target.subprojects { configureGraphTasks() }
28+ if (! buildFeatures.isolatedProjects.active.orElse(false ).get()) {
29+ target.subprojects { configureGraphTasks() }
30+ }
2531 }
2632}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
2727import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension
2828import org.jetbrains.kotlin.gradle.dsl.KotlinBaseExtension
2929import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
30+ import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
3031
3132/* *
3233 * Configure base Kotlin with Android options
@@ -85,6 +86,8 @@ private inline fun <reified T : KotlinBaseExtension> Project.configureKotlin() =
8586 is KotlinJvmProjectExtension -> compilerOptions
8687 else -> TODO (" Unsupported project extension $this ${T ::class } " )
8788 }.apply {
89+ languageVersion.set(KotlinVersion .KOTLIN_2_2 )
90+ coreLibrariesVersion = " 2.2.0"
8891 jvmTarget = JvmTarget .JVM_11
8992 allWarningsAsErrors = warningsAsErrors
9093 freeCompilerArgs.add(
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ dependencyResolutionManagement {
3131 }
3232 }
3333 mavenCentral()
34+ maven(" https://central.sonatype.com/repository/maven-snapshots/" )
3435 }
3536 versionCatalogs {
3637 create(" libs" ) {
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ org.gradle.configuration-cache.parallel=true
4444# to generate the Configuration Cache regardless of incompatible tasks.
4545# See https://github.com/android/nowinandroid/issues/1022 before using it.
4646org.gradle.configuration-cache.problems =warn
47+ org.gradle.unsafe.isolated-projects =true
48+ org.gradle.internal.isolated-projects.parallel =false
49+ ksp.project.isolation.enabled =true
4750
4851# AndroidX package structure to make it clearer which packages are bundled with the
4952# Android operating system, and which are packaged with your app"s APK
Original file line number Diff line number Diff line change @@ -42,11 +42,11 @@ hilt = "2.57.2"
4242hiltExt = " 1.2.0"
4343jacoco = " 0.8.12"
4444junit4 = " 4.13.2"
45- kotlin = " 2.2.21 "
45+ kotlin = " 2.3.0-Beta2 "
4646kotlinxCoroutines = " 1.10.1"
4747kotlinxDatetime = " 0.6.1"
4848kotlinxSerializationJson = " 1.8.0"
49- ksp = " 2.3.1 "
49+ ksp = " 2.3.4-SNAPSHOT "
5050okhttp = " 4.12.0"
5151protobuf = " 4.29.2"
5252protobufPlugin = " 0.9.5"
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ pluginManagement {
2626 }
2727 mavenCentral()
2828 gradlePluginPortal()
29+ maven(" https://central.sonatype.com/repository/maven-snapshots/" )
2930 }
3031}
3132
@@ -40,6 +41,7 @@ dependencyResolutionManagement {
4041 }
4142 }
4243 mavenCentral()
44+ maven(" https://central.sonatype.com/repository/maven-snapshots/" )
4345 }
4446}
4547rootProject.name = " nowinandroid"
You can’t perform that action at this time.
0 commit comments