From 4601eab864ee226f355c3e49c9eecfbfe9ae9fc9 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 27 Aug 2024 18:57:59 +0600 Subject: [PATCH] update gradle scripts to improve performance of configuration --- android/alerts/common/build.gradle | 2 +- android/alerts/recyclerview/build.gradle | 2 +- android/pickers/build.gradle | 2 +- android/recyclerview/build.gradle | 2 +- android/smalltextfield/build.gradle | 2 +- colors/build.gradle | 2 +- colors/common/build.gradle | 2 +- common/build.gradle | 2 +- common/compose/build.gradle | 2 +- coroutines/build.gradle | 2 +- coroutines/compose/build.gradle | 2 +- crypto/build.gradle | 2 +- dokka/build.gradle | 2 +- extensions.gradle | 67 +++++++-------- fsm/common/build.gradle | 2 +- fsm/repos/common/build.gradle | 2 +- .../templates/defaultAndroidSettings.gradle | 0 .../templates/mppAndroidProject.gradle | 4 +- ...sAndroidLinuxMingwLinuxArm64Project.gradle | 4 +- .../templates/mppJavaProject.gradle | 2 +- ...sAndroidLinuxMingwLinuxArm64Project.gradle | 4 +- .../mppJvmJsLinuxMingwProject.gradle | 2 +- ...pProjectWithSerializationAndCompose.gradle | 4 +- .../templates/publish.gradle | 0 publish.kpsb => gradle/templates/publish.kpsb | 0 .../templates/publish_jvm.gradle | 0 .../templates/publish_jvm.kpsb | 0 koin/build.gradle | 2 +- koin/generator/build.gradle | 2 +- koin/generator/test/build.gradle | 2 +- ksp/classcasts/build.gradle | 2 +- ksp/classcasts/generator/build.gradle | 2 +- ksp/classcasts/generator/test/build.gradle | 2 +- ksp/generator/build.gradle | 2 +- ksp/sealed/build.gradle | 2 +- ksp/sealed/generator/build.gradle | 2 +- ksp/sealed/generator/test/build.gradle | 2 +- ktor/client/build.gradle | 2 +- ktor/common/build.gradle | 2 +- ktor/server/build.gradle | 2 +- language_codes/build.gradle | 2 +- matrix/build.gradle | 2 +- mime_types/build.gradle | 2 +- mppJvmJsAndroidProject.gradle | 82 ------------------- mppJvmJsLinuxMingwLinuxArm64Project.gradle | 72 ---------------- pagination/common/build.gradle | 2 +- pagination/exposed/build.gradle | 2 +- pagination/ktor/common/build.gradle | 2 +- pagination/ktor/server/build.gradle | 2 +- repos/cache/build.gradle | 2 +- repos/common/build.gradle | 2 +- repos/common/tests/build.gradle | 2 +- repos/exposed/build.gradle | 2 +- repos/generator/build.gradle | 2 +- repos/generator/test/build.gradle | 2 +- repos/inmemory/build.gradle | 2 +- repos/ktor/client/build.gradle | 2 +- repos/ktor/common/build.gradle | 2 +- repos/ktor/server/build.gradle | 2 +- resources/build.gradle | 2 +- safe_wrapper/build.gradle | 2 +- selector/common/build.gradle | 2 +- serialization/base64/build.gradle | 2 +- serialization/encapsulator/build.gradle | 2 +- serialization/mapper/build.gradle | 2 +- serialization/typed_serializer/build.gradle | 2 +- startup/launcher/build.gradle | 2 +- startup/plugin/build.gradle | 2 +- startup/template/client/build.gradle | 2 +- startup/template/common/build.gradle | 2 +- startup/template/server/build.gradle | 2 +- 71 files changed, 95 insertions(+), 260 deletions(-) rename defaultAndroidSettings.gradle => gradle/templates/defaultAndroidSettings.gradle (100%) rename mppAndroidProject.gradle => gradle/templates/mppAndroidProject.gradle (90%) rename mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle => gradle/templates/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle (96%) rename mppJavaProject.gradle => gradle/templates/mppJavaProject.gradle (96%) rename mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle => gradle/templates/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle (96%) rename mppJvmJsLinuxMingwProject.gradle => gradle/templates/mppJvmJsLinuxMingwProject.gradle (97%) rename mppProjectWithSerializationAndCompose.gradle => gradle/templates/mppProjectWithSerializationAndCompose.gradle (96%) rename publish.gradle => gradle/templates/publish.gradle (100%) rename publish.kpsb => gradle/templates/publish.kpsb (100%) rename jvm.publish.gradle => gradle/templates/publish_jvm.gradle (100%) rename jvm.publish.kpsb => gradle/templates/publish_jvm.kpsb (100%) delete mode 100644 mppJvmJsAndroidProject.gradle delete mode 100644 mppJvmJsLinuxMingwLinuxArm64Project.gradle diff --git a/android/alerts/common/build.gradle b/android/alerts/common/build.gradle index 2c4a222700d..29e8f55fbab 100644 --- a/android/alerts/common/build.gradle +++ b/android/alerts/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppAndroidProjectPresetPath" +apply from: "$mppAndroidProject" kotlin { sourceSets { diff --git a/android/alerts/recyclerview/build.gradle b/android/alerts/recyclerview/build.gradle index af7d2b0b2cc..7149cb1f952 100644 --- a/android/alerts/recyclerview/build.gradle +++ b/android/alerts/recyclerview/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppAndroidProjectPresetPath" +apply from: "$mppAndroidProject" kotlin { sourceSets { diff --git a/android/pickers/build.gradle b/android/pickers/build.gradle index d926ab4bbd9..17c6ce042b4 100644 --- a/android/pickers/build.gradle +++ b/android/pickers/build.gradle @@ -6,7 +6,7 @@ plugins { alias(libs.plugins.kt.jb.compose) } -apply from: "$mppProjectWithSerializationAndComposePresetPath" +apply from: "$mppProjectWithSerializationAndCompose" kotlin { sourceSets { diff --git a/android/recyclerview/build.gradle b/android/recyclerview/build.gradle index ff5a2ee19ce..ec233210840 100644 --- a/android/recyclerview/build.gradle +++ b/android/recyclerview/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppAndroidProjectPresetPath" +apply from: "$mppAndroidProject" kotlin { sourceSets { diff --git a/android/smalltextfield/build.gradle b/android/smalltextfield/build.gradle index 523f3758844..f8c258714b7 100644 --- a/android/smalltextfield/build.gradle +++ b/android/smalltextfield/build.gradle @@ -6,7 +6,7 @@ plugins { alias(libs.plugins.kt.jb.compose) } -apply from: "$mppProjectWithSerializationAndComposePresetPath" +apply from: "$mppProjectWithSerializationAndCompose" kotlin { sourceSets { diff --git a/colors/build.gradle b/colors/build.gradle index 79288bed888..f7c1a7cecb3 100644 --- a/colors/build.gradle +++ b/colors/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/colors/common/build.gradle b/colors/common/build.gradle index d425197852e..9e169e84113 100644 --- a/colors/common/build.gradle +++ b/colors/common/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/common/build.gradle b/common/build.gradle index 01489bbf4f1..eea0236fc9a 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/common/compose/build.gradle b/common/compose/build.gradle index 22616d2da3f..df504ddfb76 100644 --- a/common/compose/build.gradle +++ b/common/compose/build.gradle @@ -6,7 +6,7 @@ plugins { alias(libs.plugins.kt.jb.compose) } -apply from: "$mppComposeJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/coroutines/build.gradle b/coroutines/build.gradle index 8c246516b70..42c09d974c4 100644 --- a/coroutines/build.gradle +++ b/coroutines/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/coroutines/compose/build.gradle b/coroutines/compose/build.gradle index e68a126b5ba..7f5f7aa1677 100644 --- a/coroutines/compose/build.gradle +++ b/coroutines/compose/build.gradle @@ -6,7 +6,7 @@ plugins { alias(libs.plugins.kt.jb.compose) } -apply from: "$mppComposeJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/crypto/build.gradle b/crypto/build.gradle index 649a79fba9e..7c018861781 100644 --- a/crypto/build.gradle +++ b/crypto/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/dokka/build.gradle b/dokka/build.gradle index 6da9c1af342..86d156f90d3 100644 --- a/dokka/build.gradle +++ b/dokka/build.gradle @@ -130,4 +130,4 @@ tasks.dokkaHtml { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" diff --git a/extensions.gradle b/extensions.gradle index 3632203fc15..2b5e461e41f 100644 --- a/extensions.gradle +++ b/extensions.gradle @@ -1,43 +1,32 @@ -allprojects { - ext { - projectByName = { name -> - for (subproject in rootProject.subprojects) { - if (subproject.name == name) { - return subproject - } - } - return null - } +File templatesFolder = new File("$rootProject.projectDir.absolutePath${File.separatorChar}gradle${File.separatorChar}templates") - internalProject = { name -> -// if (releaseMode) { -// "$group:$name:$version" -// } else { -// projectByName("$name") -// } - projectByName("$name") - } +Map properties = new HashMap() - releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true" -// String compilerPluginVersionFromProperties = (String) project.properties["compose.kotlinCompilerPluginVersion"] -// String compilerPluginVersionFromLibrariesVersions = libs.versions.compose.kotlin.get() -// composePluginKotlinVersion = compilerPluginVersionFromProperties -// if (compilerPluginVersionFromProperties == null) { -// composePluginKotlinVersion = compilerPluginVersionFromLibrariesVersions -// } - - mppProjectWithSerializationPresetPath = "${rootProject.projectDir.absolutePath}/mppJvmJsAndroidProject.gradle" - mppProjectWithSerializationAndComposePresetPath = "${rootProject.projectDir.absolutePath}/mppProjectWithSerializationAndCompose.gradle" - mppJavaProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJavaProject.gradle" - mppJvmJsLinuxMingwProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJvmJsLinuxMingwProject.gradle" - mppJvmJsLinuxMingwLinuxArm64ProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJvmJsLinuxMingwLinuxArm64Project.gradle" - mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle" - mppComposeJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle" - mppAndroidProjectPresetPath = "${rootProject.projectDir.absolutePath}/mppAndroidProject.gradle" - - defaultAndroidSettingsPresetPath = "${rootProject.projectDir.absolutePath}/defaultAndroidSettings.gradle" - - publishGradlePath = "${rootProject.projectDir.absolutePath}/publish.gradle" - publishJvmOnlyPath = "${rootProject.projectDir.absolutePath}/jvm.publish.gradle" +if (templatesFolder.exists() && templatesFolder.isDirectory()) { + templatesFolder.listFiles().each { + properties[it.name - ".gradle"] = it.absolutePath + } +} + +properties["projectByName"] = { name -> + for (subproject in rootProject.subprojects) { + if (subproject.name == name) { + return subproject + } + } + return null +} + +properties["internalProject"] = { name -> + projectByName("$name") +} + +allprojects { + ext { + releaseMode = (project.hasProperty('RELEASE_MODE') && project.property('RELEASE_MODE') == "true") || System.getenv('RELEASE_MODE') == "true" + + properties.forEach { k, v -> + it[k] = v + } } } diff --git a/fsm/common/build.gradle b/fsm/common/build.gradle index 9f1a514dbaa..ee882e2b7b6 100644 --- a/fsm/common/build.gradle +++ b/fsm/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/fsm/repos/common/build.gradle b/fsm/repos/common/build.gradle index a1011624ad7..262cba815e9 100644 --- a/fsm/repos/common/build.gradle +++ b/fsm/repos/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/defaultAndroidSettings.gradle b/gradle/templates/defaultAndroidSettings.gradle similarity index 100% rename from defaultAndroidSettings.gradle rename to gradle/templates/defaultAndroidSettings.gradle diff --git a/mppAndroidProject.gradle b/gradle/templates/mppAndroidProject.gradle similarity index 90% rename from mppAndroidProject.gradle rename to gradle/templates/mppAndroidProject.gradle index 6424eee0639..3173408b142 100644 --- a/mppAndroidProject.gradle +++ b/gradle/templates/mppAndroidProject.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { androidTarget { @@ -29,7 +29,7 @@ kotlin { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" java { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle b/gradle/templates/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle similarity index 96% rename from mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle rename to gradle/templates/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle index f7dee6e0a65..093baec0738 100644 --- a/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle +++ b/gradle/templates/mppComposeJvmJsAndroidLinuxMingwLinuxArm64Project.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { jvm { @@ -100,7 +100,7 @@ kotlin { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" java { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/mppJavaProject.gradle b/gradle/templates/mppJavaProject.gradle similarity index 96% rename from mppJavaProject.gradle rename to gradle/templates/mppJavaProject.gradle index d2d60ceaa28..d4a050d1499 100644 --- a/mppJavaProject.gradle +++ b/gradle/templates/mppJavaProject.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { jvm { diff --git a/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle b/gradle/templates/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle similarity index 96% rename from mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle rename to gradle/templates/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle index 9fb86a673ed..0da72807753 100644 --- a/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle +++ b/gradle/templates/mppJvmJsAndroidLinuxMingwLinuxArm64Project.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { jvm { @@ -80,7 +80,7 @@ kotlin { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" java { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/mppJvmJsLinuxMingwProject.gradle b/gradle/templates/mppJvmJsLinuxMingwProject.gradle similarity index 97% rename from mppJvmJsLinuxMingwProject.gradle rename to gradle/templates/mppJvmJsLinuxMingwProject.gradle index 8f56313f224..82e5a4025b7 100644 --- a/mppJvmJsLinuxMingwProject.gradle +++ b/gradle/templates/mppJvmJsLinuxMingwProject.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { jvm { diff --git a/mppProjectWithSerializationAndCompose.gradle b/gradle/templates/mppProjectWithSerializationAndCompose.gradle similarity index 96% rename from mppProjectWithSerializationAndCompose.gradle rename to gradle/templates/mppProjectWithSerializationAndCompose.gradle index 28f51365a70..f0cea653e66 100644 --- a/mppProjectWithSerializationAndCompose.gradle +++ b/gradle/templates/mppProjectWithSerializationAndCompose.gradle @@ -1,7 +1,7 @@ project.version = "$version" project.group = "$group" -apply from: "$publishGradlePath" +apply from: "$publish" kotlin { jvm { @@ -83,7 +83,7 @@ kotlin { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" java { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/publish.gradle b/gradle/templates/publish.gradle similarity index 100% rename from publish.gradle rename to gradle/templates/publish.gradle diff --git a/publish.kpsb b/gradle/templates/publish.kpsb similarity index 100% rename from publish.kpsb rename to gradle/templates/publish.kpsb diff --git a/jvm.publish.gradle b/gradle/templates/publish_jvm.gradle similarity index 100% rename from jvm.publish.gradle rename to gradle/templates/publish_jvm.gradle diff --git a/jvm.publish.kpsb b/gradle/templates/publish_jvm.kpsb similarity index 100% rename from jvm.publish.kpsb rename to gradle/templates/publish_jvm.kpsb diff --git a/koin/build.gradle b/koin/build.gradle index 7d4d192ddc5..466bf1b376f 100644 --- a/koin/build.gradle +++ b/koin/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/koin/generator/build.gradle b/koin/generator/build.gradle index 42e134bee77..de6d7d1abec 100644 --- a/koin/generator/build.gradle +++ b/koin/generator/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.kotlin.jvm" } -apply from: "$publishJvmOnlyPath" +apply from: "$publish_jvm" repositories { mavenCentral() diff --git a/koin/generator/test/build.gradle b/koin/generator/test/build.gradle index eaeb65b7958..1c8f42c9caa 100644 --- a/koin/generator/test/build.gradle +++ b/koin/generator/test/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.google.devtools.ksp" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { diff --git a/ksp/classcasts/build.gradle b/ksp/classcasts/build.gradle index d425197852e..9e169e84113 100644 --- a/ksp/classcasts/build.gradle +++ b/ksp/classcasts/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/ksp/classcasts/generator/build.gradle b/ksp/classcasts/generator/build.gradle index 8fcda0f1491..3d23f7a4bc8 100644 --- a/ksp/classcasts/generator/build.gradle +++ b/ksp/classcasts/generator/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.kotlin.jvm" } -apply from: "$publishJvmOnlyPath" +apply from: "$publish_jvm" repositories { mavenCentral() diff --git a/ksp/classcasts/generator/test/build.gradle b/ksp/classcasts/generator/test/build.gradle index d28ea08992c..fb0690103e3 100644 --- a/ksp/classcasts/generator/test/build.gradle +++ b/ksp/classcasts/generator/test/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.google.devtools.ksp" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { diff --git a/ksp/generator/build.gradle b/ksp/generator/build.gradle index 2f2ffb16628..d50335b5d72 100644 --- a/ksp/generator/build.gradle +++ b/ksp/generator/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.kotlin.jvm" } -apply from: "$publishJvmOnlyPath" +apply from: "$publish_jvm" repositories { mavenCentral() diff --git a/ksp/sealed/build.gradle b/ksp/sealed/build.gradle index d425197852e..9e169e84113 100644 --- a/ksp/sealed/build.gradle +++ b/ksp/sealed/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/ksp/sealed/generator/build.gradle b/ksp/sealed/generator/build.gradle index 026e94b30ca..f424f417074 100644 --- a/ksp/sealed/generator/build.gradle +++ b/ksp/sealed/generator/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.kotlin.jvm" } -apply from: "$publishJvmOnlyPath" +apply from: "$publish_jvm" repositories { mavenCentral() diff --git a/ksp/sealed/generator/test/build.gradle b/ksp/sealed/generator/test/build.gradle index de8aeb4d6d7..9bb06ae1fd8 100644 --- a/ksp/sealed/generator/test/build.gradle +++ b/ksp/sealed/generator/test/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.google.devtools.ksp" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { diff --git a/ktor/client/build.gradle b/ktor/client/build.gradle index a3e994d247d..454da1ff3b2 100644 --- a/ktor/client/build.gradle +++ b/ktor/client/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/ktor/common/build.gradle b/ktor/common/build.gradle index 9f1a98fd5bd..2e044e41e55 100644 --- a/ktor/common/build.gradle +++ b/ktor/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/ktor/server/build.gradle b/ktor/server/build.gradle index f42b279e88f..430a36ef4d6 100644 --- a/ktor/server/build.gradle +++ b/ktor/server/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets { diff --git a/language_codes/build.gradle b/language_codes/build.gradle index d425197852e..9e169e84113 100644 --- a/language_codes/build.gradle +++ b/language_codes/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/matrix/build.gradle b/matrix/build.gradle index d425197852e..9e169e84113 100644 --- a/matrix/build.gradle +++ b/matrix/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/mime_types/build.gradle b/mime_types/build.gradle index d425197852e..9e169e84113 100644 --- a/mime_types/build.gradle +++ b/mime_types/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/mppJvmJsAndroidProject.gradle b/mppJvmJsAndroidProject.gradle deleted file mode 100644 index 95d22babd49..00000000000 --- a/mppJvmJsAndroidProject.gradle +++ /dev/null @@ -1,82 +0,0 @@ -project.version = "$version" -project.group = "$group" - -apply from: "$publishGradlePath" - -kotlin { - jvm { - compilations.main { - kotlinOptions { - jvmTarget = "17" - } - } - } - js (IR) { - browser { - testTask { - useMocha { - timeout = "60000" - } - } - } - nodejs { - testTask { - useMocha { - timeout = "60000" - } - } - } - } - androidTarget { - publishAllLibraryVariants() - compilations.all { - kotlinOptions { - jvmTarget = "17" - } - } - } - linuxX64() - mingwX64() - - sourceSets { - commonMain { - dependencies { - implementation kotlin('stdlib') - api libs.kt.serialization - } - } - commonTest { - dependencies { - implementation kotlin('test-common') - implementation kotlin('test-annotations-common') - implementation libs.kt.coroutines.test - } - } - jvmTest { - dependencies { - implementation kotlin('test-junit') - } - } - jsTest { - dependencies { - implementation kotlin('test-js') - } - } - androidUnitTest { - dependencies { - implementation kotlin('test-junit') - implementation libs.android.test.junit - implementation libs.android.espresso - } - } - - androidMain.dependsOn jvmMain - } -} - -apply from: "$defaultAndroidSettingsPresetPath" - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} diff --git a/mppJvmJsLinuxMingwLinuxArm64Project.gradle b/mppJvmJsLinuxMingwLinuxArm64Project.gradle deleted file mode 100644 index 9d4d450a220..00000000000 --- a/mppJvmJsLinuxMingwLinuxArm64Project.gradle +++ /dev/null @@ -1,72 +0,0 @@ -project.version = "$version" -project.group = "$group" - -apply from: "$publishGradlePath" - -kotlin { - jvm { - compilations.main { - kotlinOptions { - jvmTarget = "17" - } - } - } - js (IR) { - browser { - testTask { - useMocha { - timeout = "60000" - } - } - } - nodejs { - testTask { - useMocha { - timeout = "60000" - } - } - } - } - linuxX64() - mingwX64() - linuxArm64() - - sourceSets { - commonMain { - dependencies { - implementation kotlin('stdlib') - api libs.kt.serialization - } - } - commonTest { - dependencies { - implementation kotlin('test-common') - implementation kotlin('test-annotations-common') - implementation libs.kt.coroutines.test - } - } - - jvmTest { - dependencies { - implementation kotlin('test-junit') - } - } - jsTest { - dependencies { - implementation kotlin('test-js') - } - } - - nativeMain.dependsOn commonMain - linuxX64Main.dependsOn nativeMain - mingwX64Main.dependsOn nativeMain - linuxArm64Main.dependsOn nativeMain - - androidMain.dependsOn jvmMain - } -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} diff --git a/pagination/common/build.gradle b/pagination/common/build.gradle index 0fc4ffcfccf..683dae26159 100644 --- a/pagination/common/build.gradle +++ b/pagination/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/pagination/exposed/build.gradle b/pagination/exposed/build.gradle index cb7043ff2c5..dd919ba191e 100644 --- a/pagination/exposed/build.gradle +++ b/pagination/exposed/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets { diff --git a/pagination/ktor/common/build.gradle b/pagination/ktor/common/build.gradle index 1934dde2b24..d32ba92503d 100644 --- a/pagination/ktor/common/build.gradle +++ b/pagination/ktor/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/pagination/ktor/server/build.gradle b/pagination/ktor/server/build.gradle index 265848cb1ea..0ce5303093a 100644 --- a/pagination/ktor/server/build.gradle +++ b/pagination/ktor/server/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets { diff --git a/repos/cache/build.gradle b/repos/cache/build.gradle index bd1e28bffc0..483fc698661 100644 --- a/repos/cache/build.gradle +++ b/repos/cache/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/repos/common/build.gradle b/repos/common/build.gradle index 8079f0b47e8..73a30291df9 100644 --- a/repos/common/build.gradle +++ b/repos/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/repos/common/tests/build.gradle b/repos/common/tests/build.gradle index ba8a8f0d4ec..22158b48a9f 100644 --- a/repos/common/tests/build.gradle +++ b/repos/common/tests/build.gradle @@ -61,7 +61,7 @@ kotlin { } } -apply from: "$defaultAndroidSettingsPresetPath" +apply from: "$defaultAndroidSettings" java { sourceCompatibility = JavaVersion.VERSION_17 diff --git a/repos/exposed/build.gradle b/repos/exposed/build.gradle index c92d0d600f3..787f3499679 100644 --- a/repos/exposed/build.gradle +++ b/repos/exposed/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets { diff --git a/repos/generator/build.gradle b/repos/generator/build.gradle index e6f9c5437e3..9f751158573 100644 --- a/repos/generator/build.gradle +++ b/repos/generator/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.jetbrains.kotlin.jvm" } -apply from: "$publishJvmOnlyPath" +apply from: "$publish_jvm" repositories { mavenCentral() diff --git a/repos/generator/test/build.gradle b/repos/generator/test/build.gradle index 60490b485b7..20c11632a17 100644 --- a/repos/generator/test/build.gradle +++ b/repos/generator/test/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.google.devtools.ksp" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { diff --git a/repos/inmemory/build.gradle b/repos/inmemory/build.gradle index ec31c5fa1ea..33b989eaf48 100644 --- a/repos/inmemory/build.gradle +++ b/repos/inmemory/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/repos/ktor/client/build.gradle b/repos/ktor/client/build.gradle index 70f7fee9073..c8cd17d20b6 100644 --- a/repos/ktor/client/build.gradle +++ b/repos/ktor/client/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/repos/ktor/common/build.gradle b/repos/ktor/common/build.gradle index c6755dbf3d2..46ccf649378 100644 --- a/repos/ktor/common/build.gradle +++ b/repos/ktor/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/repos/ktor/server/build.gradle b/repos/ktor/server/build.gradle index 00538c09724..eb2b62abe85 100644 --- a/repos/ktor/server/build.gradle +++ b/repos/ktor/server/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets { diff --git a/resources/build.gradle b/resources/build.gradle index 178fbdff3f5..b73240fb2a1 100644 --- a/resources/build.gradle +++ b/resources/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/safe_wrapper/build.gradle b/safe_wrapper/build.gradle index 4de292973e2..baeb8b29275 100644 --- a/safe_wrapper/build.gradle +++ b/safe_wrapper/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/selector/common/build.gradle b/selector/common/build.gradle index 2cca2f38c6f..da59911dabf 100644 --- a/selector/common/build.gradle +++ b/selector/common/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/serialization/base64/build.gradle b/serialization/base64/build.gradle index 7a6e3883145..3072e4eb5d0 100644 --- a/serialization/base64/build.gradle +++ b/serialization/base64/build.gradle @@ -4,7 +4,7 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/serialization/encapsulator/build.gradle b/serialization/encapsulator/build.gradle index d425197852e..9e169e84113 100644 --- a/serialization/encapsulator/build.gradle +++ b/serialization/encapsulator/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/serialization/mapper/build.gradle b/serialization/mapper/build.gradle index d425197852e..9e169e84113 100644 --- a/serialization/mapper/build.gradle +++ b/serialization/mapper/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/serialization/typed_serializer/build.gradle b/serialization/typed_serializer/build.gradle index d425197852e..9e169e84113 100644 --- a/serialization/typed_serializer/build.gradle +++ b/serialization/typed_serializer/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/startup/launcher/build.gradle b/startup/launcher/build.gradle index c62029fb900..f5622eda270 100644 --- a/startup/launcher/build.gradle +++ b/startup/launcher/build.gradle @@ -5,7 +5,7 @@ plugins { id "com.google.devtools.ksp" } -apply from: "$mppJvmJsLinuxMingwProjectPresetPath" +apply from: "$mppJvmJsLinuxMingwProject" kotlin { sourceSets { diff --git a/startup/plugin/build.gradle b/startup/plugin/build.gradle index 0aef62701a0..aadfac944d7 100644 --- a/startup/plugin/build.gradle +++ b/startup/plugin/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJvmJsLinuxMingwProjectPresetPath" +apply from: "$mppJvmJsLinuxMingwProject" kotlin { sourceSets { diff --git a/startup/template/client/build.gradle b/startup/template/client/build.gradle index 6f67e36c1df..6c8676b9c55 100644 --- a/startup/template/client/build.gradle +++ b/startup/template/client/build.gradle @@ -5,7 +5,7 @@ plugins { alias(libs.plugins.compose) } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" kotlin { sourceSets { diff --git a/startup/template/common/build.gradle b/startup/template/common/build.gradle index d425197852e..9e169e84113 100644 --- a/startup/template/common/build.gradle +++ b/startup/template/common/build.gradle @@ -4,4 +4,4 @@ plugins { id "com.android.library" } -apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64ProjectPresetPath" +apply from: "$mppJvmJsAndroidLinuxMingwLinuxArm64Project" diff --git a/startup/template/server/build.gradle b/startup/template/server/build.gradle index 3e0450e219b..33eb4924699 100644 --- a/startup/template/server/build.gradle +++ b/startup/template/server/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.jetbrains.kotlin.plugin.serialization" } -apply from: "$mppJavaProjectPresetPath" +apply from: "$mppJavaProject" kotlin { sourceSets {