diff --git a/README.md b/README.md index 41d0cbd..e5cf8ac 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ dependencies { [badge-license]: https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat -[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.21-blue.svg?logo=kotlin +[badge-kotlin]: https://img.shields.io/badge/kotlin-1.9.23-blue.svg?logo=kotlin [badge-platform-android]: http://img.shields.io/badge/-android-6EDB8D.svg?style=flat diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 6832bca..65d83f0 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -18,7 +18,7 @@ plugins { } dependencies { - implementation(libs.gradle.kotlin) - implementation(libs.gradle.maven.publish) implementation(libs.gradle.kmp.configuration) + implementation(libs.gradle.kotlin) + implementation(libs.gradle.publish.maven) } diff --git a/build.gradle.kts b/build.gradle.kts index f550952..cbcfafe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,14 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. **/ -import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnPlugin import org.jetbrains.kotlin.gradle.targets.js.yarn.YarnRootExtension plugins { alias(libs.plugins.multiplatform) apply(false) - alias(libs.plugins.binaryCompat) - alias(libs.plugins.gradleVersions) + alias(libs.plugins.binary.compat) } allprojects { @@ -52,33 +50,3 @@ apiValidation { ignoredProjects.add("sample") } } - -fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } - val regex = "^[0-9,.v-]+(-r)?$".toRegex() - val isStable = stableKeyword || regex.matches(version) - return isStable.not() -} - -tasks.withType { - // Example 1: reject all non stable versions - rejectVersionIf { - isNonStable(candidate.version) - } - - // Example 2: disallow release candidates as upgradable versions from stable versions - rejectVersionIf { - isNonStable(candidate.version) && !isNonStable(currentVersion) - } - - // Example 3: using the full syntax - resolutionStrategy { - componentSelection { - all(Action { - if (isNonStable(candidate.version) && !isNonStable(currentVersion)) { - reject("Release candidate") - } - }) - } - } -} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 80e7277..3183cf3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,16 +1,14 @@ [versions] -binaryCompat = "0.13.2" -configuration = "0.1.5" -gradleVersions = "0.50.0" -kotlin = "1.9.21" -publish = "0.25.3" +gradle-binary-compat = "0.14.0" +gradle-kmp-configuration = "0.2.0" +gradle-kotlin = "1.9.23" +gradle-publish-maven = "0.27.0" [libraries] -gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "configuration" } -gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } -gradle-maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "publish" } +gradle-kmp-configuration = { module = "io.matthewnelson:gradle-kmp-configuration-plugin", version.ref = "gradle-kmp-configuration" } +gradle-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "gradle-kotlin" } +gradle-publish-maven = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "gradle-publish-maven" } [plugins] -binaryCompat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompat" } -gradleVersions = { id = "com.github.ben-manes.versions", version.ref = "gradleVersions" } -multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +binary-compat = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "gradle-binary-compat" } +multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "gradle-kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a2b81f7..6357ddc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,5 +4,5 @@ zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME # https://gradle.org/release-checksums/ -distributionSha256Sum=f2b9ed0faf8472cbe469255ae6c86eddb77076c75191741b4a462f33128dd419 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +distributionSha256Sum=85719317abd2112f021d4f41f09ec370534ba288432065f4b477b6a3b652910d +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip