From 2144ca2ccac33ad4d3d27e11de82e97e44acce8a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 2 Nov 2023 17:30:42 +0600 Subject: [PATCH] update to support gradle 8.+ --- .../core/export/GpgSignMavenConfig.kt | 6 ++++++ .../core/export/js_only/MavenTemplater.kt | 4 ++-- .../core/export/mpp/MavenTemplater.kt | 2 +- gradle/libs.versions.toml | 16 ++++++++-------- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/GpgSignMavenConfig.kt b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/GpgSignMavenConfig.kt index 9f5e03e..908773d 100644 --- a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/GpgSignMavenConfig.kt +++ b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/GpgSignMavenConfig.kt @@ -20,6 +20,12 @@ if (project.hasProperty("signing.gnupg.keyName")) { dependsOn(it) } } + + // Workaround to make android sign operations depend on signing tasks + project.getTasks().withType(AbstractPublishToMaven.class).configureEach { + def signingTasks = project.getTasks().withType(Sign.class) + mustRunAfter(signingTasks) + } } """ GpgSigning.Enabled -> diff --git a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/js_only/MavenTemplater.kt b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/js_only/MavenTemplater.kt index 5a11845..800cc1a 100644 --- a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/js_only/MavenTemplater.kt +++ b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/js_only/MavenTemplater.kt @@ -7,13 +7,13 @@ fun MavenConfig.buildJsOnlyMavenConfig(licenses: List): String = """ apply plugin: 'maven-publish' task javadocJar(type: Jar) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' } task sourcesJar(type: Jar) { kotlin.sourceSets.all { from(kotlin) } - classifier = 'sources' + archiveClassifier = 'sources' } publishing { diff --git a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/mpp/MavenTemplater.kt b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/mpp/MavenTemplater.kt index def4860..1f460e5 100644 --- a/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/mpp/MavenTemplater.kt +++ b/core/src/commonMain/kotlin/dev/inmo/kmppscriptbuilder/core/export/mpp/MavenTemplater.kt @@ -7,7 +7,7 @@ fun MavenConfig.buildMultiplatformMavenConfig(licenses: List): String = apply plugin: 'maven-publish' task javadocsJar(type: Jar) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' } publishing { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1a3016a..cf944d7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] -kt = "1.8.20" -kt-serialization = "1.5.1" -kt-coroutines = "1.7.2" +kt = "1.9.20" +kt-serialization = "1.6.0" +kt-coroutines = "1.7.3" -jb-compose = "1.4.1" -jb-dokka = "1.8.20" -microutils = "0.19.7" -kjsuikit = "0.7.1" +jb-compose = "1.5.10" +jb-dokka = "1.9.10" +microutils = "0.20.11" +kjsuikit = "0.7.2" -ktor = "2.3.2" +ktor = "2.3.5" gh-release = "2.4.1" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c50b3c8..4d6272d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip