diff --git a/build.gradle.kts b/build.gradle.kts index 92e88ff..255832f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,6 @@ +import com.vanniktech.maven.publish.MavenPublishBaseExtension +import com.vanniktech.maven.publish.MavenPublishPlugin +import com.vanniktech.maven.publish.SonatypeHost import nl.littlerobots.vcu.plugin.versionCatalogUpdate import nl.littlerobots.vcu.plugin.versionSelector import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension @@ -14,6 +17,7 @@ plugins { alias(libs.plugins.dokka) alias(libs.plugins.atomicfu) alias(libs.plugins.compose.compiler) apply false + alias(libs.plugins.maven.publish) apply false // plugins already on a classpath (conventions) // alias(libs.plugins.androidApplication) apply false // alias(libs.plugins.androidLibrary) apply false @@ -36,6 +40,38 @@ allprojects { } } } + plugins.withType().configureEach { + the().apply { + val isReleaseBuild = properties["release"]?.toString().toBoolean() + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, false) + if (isReleaseBuild) signAllPublications() + coordinates(Config.artifactId, name, Config.version(isReleaseBuild)) + pom { + name = Config.name + description = Config.description + url = Config.url + licenses { + license { + name = Config.licenseName + url = Config.licenseUrl + distribution = Config.licenseUrl + } + } + developers { + developer { + id = Config.vendorId + name = Config.vendorName + url = Config.developerUrl + email = Config.supportEmail + organizationUrl = Config.developerUrl + } + } + scm { + url = Config.scmUrl + } + } + } + } tasks.withType().configureEach { compilerOptions { jvmTarget.set(Config.jvmTarget) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 9d96ce1..83e1b39 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,6 +1,3 @@ -import Config.namespace -import com.vanniktech.maven.publish.SonatypeHost - plugins { id("pro.respawn.shared-library") alias(libs.plugins.maven.publish) @@ -14,34 +11,3 @@ dependencies { commonMainApi(libs.kotlin.coroutines.core) jvmTestImplementation(libs.bundles.unittest) } - -mavenPublishing { - val isReleaseBuild = properties["release"]?.toString().toBoolean() - publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, false) - if (isReleaseBuild) signAllPublications() - coordinates(Config.artifactId, name, Config.version(isReleaseBuild)) - pom { - name = Config.name - description = Config.description - url = Config.url - licenses { - license { - name = Config.licenseName - url = Config.licenseUrl - distribution = Config.licenseUrl - } - } - developers { - developer { - id = Config.vendorId - name = Config.vendorName - url = Config.developerUrl - email = Config.supportEmail - organizationUrl = Config.developerUrl - } - } - scm { - url = Config.scmUrl - } - } -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 17c7b98..643759c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] compose = "1.6.10" -compose-activity = "1.9.0" -compose-material3 = "1.3.0-beta04" +compose-activity = "1.9.1" +compose-material3 = "1.3.0-beta05" composeDetektPlugin = "1.3.0" core-ktx = "1.13.1" coroutines = "1.9.0-RC" @@ -9,16 +9,16 @@ dependencyAnalysisPlugin = "1.32.0" detekt = "1.23.6" detektFormattingPlugin = "1.23.6" dokka = "1.9.20" -gradleAndroid = "8.6.0-alpha08" +gradleAndroid = "8.6.0-beta02" gradleDoctorPlugin = "0.10.0" kotest = "5.9.1" # @pin kotlin = "2.0.0" kotlinx-atomicfu = "0.23.1" -lifecycle = "2.8.2" +lifecycle = "2.8.4" +maven-publish-plugin = "0.29.0" turbine = "1.0.0" versionCatalogUpdatePlugin = "0.8.4" -maven-publish-plugin = "0.29.0" [libraries] android-gradle = { module = "com.android.tools.build:gradle", version.ref = "gradleAndroid" } @@ -59,7 +59,6 @@ unittest = [ ] [plugins] -maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish-plugin" } atomicfu = { id = "kotlinx-atomicfu", version.ref = "kotlinx-atomicfu" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } dependencyAnalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysisPlugin" } @@ -67,4 +66,5 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } gradleDoctor = { id = "com.osacky.doctor", version.ref = "gradleDoctorPlugin" } kotest = { id = "io.kotest.multiplatform", version.ref = "kotest" } +maven-publish = { id = "com.vanniktech.maven.publish", version.ref = "maven-publish-plugin" } version-catalog-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "versionCatalogUpdatePlugin" } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e644113..2c35211 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bb27db5..09523c0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,6 @@ -#Fri Jul 05 18:03:39 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..f5feea6 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 25da30d..9d21a21 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ##########################################################################