diff --git a/build.gradle.kts b/build.gradle.kts index 33856b8..04ac20c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -18,7 +18,7 @@ plugins { dependencies { // List the 'library' projects - dokkatoo(projects.core) + // dokkatoo(projects.core) } // region Check the users of the project didn't forget to rename the group diff --git a/app/build.gradle.kts b/gradle/templates/template-app/build.gradle.kts similarity index 83% rename from app/build.gradle.kts rename to gradle/templates/template-app/build.gradle.kts index 4ffb5d7..28177ee 100644 --- a/app/build.gradle.kts +++ b/gradle/templates/template-app/build.gradle.kts @@ -9,7 +9,7 @@ kotlin { } sourceSets.commonMain.dependencies { - implementation(projects.core) + implementation(projects.gradle.templates.templateLib) } } diff --git a/app/src/commonMain/kotlin/Main.kt b/gradle/templates/template-app/src/commonMain/kotlin/Main.kt similarity index 100% rename from app/src/commonMain/kotlin/Main.kt rename to gradle/templates/template-app/src/commonMain/kotlin/Main.kt diff --git a/core/README.md b/gradle/templates/template-lib/README.md similarity index 100% rename from core/README.md rename to gradle/templates/template-lib/README.md diff --git a/core/build.gradle.kts b/gradle/templates/template-lib/build.gradle.kts similarity index 68% rename from core/build.gradle.kts rename to gradle/templates/template-lib/build.gradle.kts index c4d6cac..8a39f63 100644 --- a/core/build.gradle.kts +++ b/gradle/templates/template-lib/build.gradle.kts @@ -38,3 +38,19 @@ library { url.set("https://www.apache.org/licenses/LICENSE-2.0.txt") } } + +// region Publication test +// Even though this module is included in all repositories that import the Playground, we +// don't want to always publish this template. + +val appGroup: String? by project + +if (appGroup != "dev.opensavvy.playground") { + tasks.configureEach { + if (name.startsWith("publish")) { + onlyIf("Publishing is only enabled when built as part of the Playground") { false } + } + } +} + +// endregion diff --git a/core/src/commonMain/kotlin/HelloWorld.kt b/gradle/templates/template-lib/src/commonMain/kotlin/HelloWorld.kt similarity index 100% rename from core/src/commonMain/kotlin/HelloWorld.kt rename to gradle/templates/template-lib/src/commonMain/kotlin/HelloWorld.kt diff --git a/core/src/commonTest/kotlin/HelloWorldTest.kt b/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTest.kt similarity index 100% rename from core/src/commonTest/kotlin/HelloWorldTest.kt rename to gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTest.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 3715a71..a7955ae 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -26,6 +26,6 @@ plugins { } include( - "app", - "core", + "gradle:templates:template-app", + "gradle:templates:template-lib", )