From 9ef01c9f4e74167119ce31568514fbc8fbe91ec3 Mon Sep 17 00:00:00 2001 From: Ian Brandt Date: Mon, 4 Nov 2024 20:09:29 -0800 Subject: [PATCH] Improvements for future uptake of `org.gradle.unsafe.isolated-projects=true`. --- build-logic/build.gradle.kts | 3 +++ build.gradle.kts | 14 -------------- detekt-rules/build.gradle.kts | 2 +- gradle.properties | 3 +++ platforms/app-platform/build.gradle.kts | 2 -- platforms/plugins-platform/build.gradle.kts | 2 -- platforms/settings.gradle.kts | 6 ++++++ platforms/test-platform/build.gradle.kts | 2 -- settings.gradle.kts | 6 ++++++ 9 files changed, 19 insertions(+), 21 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 38b6c39..9b0bdd3 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -4,6 +4,9 @@ plugins { `kotlin-dsl` } +group = "org.sdkotlin.buildlogic" +version = "1.0.0-SNAPSHOT" + dependencies { implementation(platform("org.sdkotlin.platforms:plugins-platform")) diff --git a/build.gradle.kts b/build.gradle.kts index 0e64651..1c47f10 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,20 +13,6 @@ plugins { alias(libs.plugins.versions.gradle.plugin) } -allprojects { - group = "org.sdkotlin" - version = "1.0-SNAPSHOT" -} - -subprojects { - tasks { - register("allDependencies") { - description = "Display dependencies report for all subprojects." - group = "help" - } - } -} - dependencyAnalysis { issues { all { diff --git a/detekt-rules/build.gradle.kts b/detekt-rules/build.gradle.kts index cb9d85d..7888943 100644 --- a/detekt-rules/build.gradle.kts +++ b/detekt-rules/build.gradle.kts @@ -6,7 +6,7 @@ plugins { } group = "org.sdkotlin.detekt" -version = "1.0-SNAPSHOT" +version = "1.0.0-SNAPSHOT" dependencies { diff --git a/gradle.properties b/gradle.properties index eea975a..ff45ce4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,9 @@ org.gradle.jvmargs=-Xmx4g org.gradle.kotlin.dsl.skipMetadataVersionCheck=false org.gradle.parallel=true +# KSP and Gradle Versions Plugin `dependencyUpdates` task fails with: +#org.gradle.unsafe.isolated-projects=true + ksp.useKSP2=true dependency.analysis.print.build.health=true diff --git a/platforms/app-platform/build.gradle.kts b/platforms/app-platform/build.gradle.kts index 8b92f10..210ceba 100644 --- a/platforms/app-platform/build.gradle.kts +++ b/platforms/app-platform/build.gradle.kts @@ -2,8 +2,6 @@ plugins { id("java-platform") } -group = "org.sdkotlin.platforms" - javaPlatform { allowDependencies() } diff --git a/platforms/plugins-platform/build.gradle.kts b/platforms/plugins-platform/build.gradle.kts index a3b559e..bfbb491 100644 --- a/platforms/plugins-platform/build.gradle.kts +++ b/platforms/plugins-platform/build.gradle.kts @@ -2,8 +2,6 @@ plugins { id("java-platform") } -group = "org.sdkotlin.platforms" - dependencies { constraints { api(libs.dependency.analysis.gradle.plugin.dependency) diff --git a/platforms/settings.gradle.kts b/platforms/settings.gradle.kts index 34699d5..27241e5 100644 --- a/platforms/settings.gradle.kts +++ b/platforms/settings.gradle.kts @@ -8,6 +8,12 @@ dependencyResolutionManagement { rootProject.name = "platforms" +gradle.beforeProject { + // Set group and version properties for all projects + group = "org.sdkotlin.platforms" + version = "1.0.0-SNAPSHOT" +} + include("app-platform") include("test-platform") include("plugins-platform") diff --git a/platforms/test-platform/build.gradle.kts b/platforms/test-platform/build.gradle.kts index fdaa1a3..03f69fb 100644 --- a/platforms/test-platform/build.gradle.kts +++ b/platforms/test-platform/build.gradle.kts @@ -2,8 +2,6 @@ plugins { id("java-platform") } -group = "org.sdkotlin.platforms" - javaPlatform { allowDependencies() } diff --git a/settings.gradle.kts b/settings.gradle.kts index bed3cd2..dd03307 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -33,6 +33,12 @@ rootProject.name = "sd-kotlin-talks" includeBuild("platforms") +gradle.beforeProject { + // Set group and version properties for all projects + group = "org.sdkotlin" + version = "1.0.0-SNAPSHOT" +} + include("subprojects:di-with-koin") include("subprojects:effective-kotlin") include("subprojects:kotlin-dl")