diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index a6560437e..d8277233f 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -84,6 +84,10 @@ on: - '!docs/**' jobs: check-all: + env: + GPG_key_id: ${{ secrets.GPG_KEY_ID }} + GPG_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + GPG_private_password: ${{ secrets.GPG_PRIVATE_PASSWORD }} runs-on: ${{ github.event.inputs.run-on || 'ubuntu-latest' }} steps: - name: "Enable long paths for git Windows" diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c443079d..e916974a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change log for refreshVersions +## Version 0.60.4 (2024-01-31) + +### Potentially breaking change + +We now support only Gradle 8+. Use Gradle 8+ or stick to version 0.60.3 if you can't yet. + +### Bug fix + +Update the priority of artifact version key rules so that the longest match takes precedence, rather than the final key length. +That should fix the keys of `androidx.wear.compose` libraries. + + ## Version 0.60.3 (2023-09-27) ### Bug fix diff --git a/README.md b/README.md index 183d697f0..5cce25d17 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ // settings.gradle(.kts) plugins { // See https://splitties.github.io/refreshVersions - id("de.fayard.refreshVersions") version "0.60.3" + id("de.fayard.refreshVersions") version "0.60.4" } refreshVersions { // Optional: configure the plugin diff --git a/docs/dependency-notations.md b/docs/dependency-notations.md index 8474b55e8..c5c7ce43f 100644 --- a/docs/dependency-notations.md +++ b/docs/dependency-notations.md @@ -2401,31 +2401,31 @@ Hover 🐁 on a dependency notation to see its `Triple(KotlinName, MavenCoordina AndroidX.wear.compose foundation - material3 - material - navigation - uiTooling diff --git a/docs/requirements.txt b/docs/requirements.txt index ac50599da..70fdca60e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,21 +1,38 @@ -click==8.1.3 +mkdocs-material==9.5.6 + +# Dependencies of mkdocs-material: +Markdown==3.5.2 +pymdown-extensions==10.7 +regex==2023.12.25 +Babel==2.14.0 +Jinja2==3.1.3 +mkdocs==1.5.3 +requests==2.31.0 +Pygments==2.17.2 +colorama==0.4.6 +paginate==0.5.6 +mkdocs-material-extensions==1.3.1 + +# A plugin: + +mkdocs-markdownextradata-plugin==0.2.5 + +# Transitive dependencies + +MarkupSafe==2.1.4 +certifi==2023.11.17 +charset-normalizer==3.3.2 +click==8.1.7 ghp-import==2.1.0 -importlib-metadata==4.11.4 -Jinja2==3.1.2 -Markdown==3.3.7 -MarkupSafe==2.1.1 +idna==3.6 +importlib-metadata==7.0.1 mergedeep==1.3.4 -mkdocs==1.3.0 -mkdocs-markdownextradata-plugin==0.2.5 -mkdocs-material==8.2.16 -mkdocs-material-extensions==1.0.3 -packaging==21.3 -Pygments==2.12.0 -pymdown-extensions==9.4 -pyparsing==3.0.9 +packaging==23.2 +pathspec==0.12.1 +platformdirs==4.1.0 python-dateutil==2.8.2 -PyYAML==6.0 +PyYAML==6.0.1 pyyaml_env_tag==0.1 -six==1.16.0 -watchdog==2.1.8 -zipp==3.8.0 +urllib3==2.2.0 +watchdog==3.0.0 +zipp==3.17.0 diff --git a/docs/setup.md b/docs/setup.md index c3ec7845e..3737b23e6 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -4,7 +4,8 @@ This guide will help you set up refreshVersions in a Gradle project. ## Update Gradle (if needed) -Gradle 6.8+ is required because this plugin relies on Kotlin 1.4. +Gradle 8+ is required because this plugin relies on Kotlin 1.8. +That said, the version 0.60.3 of refreshVersions supports Gradle 6.8 to 7.x, in case you need to upgrade Gradle later. Updating Gradle is anyway usually a good idea. You get fewer bugs, more features, and faster builds. diff --git a/mkdocs.yml b/mkdocs.yml index bd124527a..702c8870e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -20,13 +20,13 @@ extra: gradlePluginPortal: https://plugins.gradle.org/plugin/de.fayard.refreshVersions slack: https://app.slack.com/client/T09229ZC6/CP5659EL9 version: - gradle: 8.4 - refreshVersions: '0.60.3' - snapshot: '0.60.4-SNAPSHOT' + gradle: 8.5 + refreshVersions: '0.60.4' + snapshot: '0.60.5-SNAPSHOT' keyboard_shortcuts: find_actions: ctrl/cmd + shift + A -copyright: 'Copyright © 2020-2023 jmfayard - Louis CAD' +copyright: 'Copyright © 2020-2024 jmfayard - Louis CAD' theme: name: 'material' diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts index 5c41c8421..18f42ee62 100644 --- a/plugins/build.gradle.kts +++ b/plugins/build.gradle.kts @@ -1,5 +1,5 @@ -allprojects { - repositories { - mavenCentral() - } +plugins { + // Defined in convention-plugins (includedBuild). + // Added here to see updates in versions.properties. + id("com.gradle.plugin-publish") apply false } diff --git a/plugins/buildSrc/build.gradle.kts b/plugins/buildSrc/build.gradle.kts deleted file mode 100644 index e3d033db9..000000000 --- a/plugins/buildSrc/build.gradle.kts +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - `kotlin-dsl` -} - -repositories { - mavenCentral() -} - -dependencies { - compileOnly(gradleKotlinDsl()) -} diff --git a/plugins/buildSrc/src/main/kotlin/Property.kt b/plugins/buildSrc/src/main/kotlin/Property.kt deleted file mode 100644 index 96763f65e..000000000 --- a/plugins/buildSrc/src/main/kotlin/Property.kt +++ /dev/null @@ -1,5 +0,0 @@ -import org.gradle.api.provider.Property - -infix fun Property.by(value: T) { - set(value) -} diff --git a/plugins/buildSrcLibs/build.gradle.kts b/plugins/buildSrcLibs/build.gradle.kts index 85cb2cde1..d899cc7b2 100644 --- a/plugins/buildSrcLibs/build.gradle.kts +++ b/plugins/buildSrcLibs/build.gradle.kts @@ -1,10 +1,7 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { - id("com.gradle.plugin-publish") - `java-gradle-plugin` - `maven-publish` - signing + id("gradle-plugin") `kotlin-dsl` } @@ -15,30 +12,12 @@ gradlePlugin { displayName = "Dependency notation generator & updates" description = "Generates dependency notations constants in buildSrc and " + "updates the versions with gradle refreshVersions" + tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") implementationClass = "de.fayard.buildSrcLibs.BuildSrcLibsPlugin" } } } -pluginBundle { - website = "https://jmfayard.github.io/refreshVersions" - vcsUrl = "https://github.com/jmfayard/refreshVersions" - tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") -} - -signing { - useInMemoryPgpKeys( - propertyOrEnvOrNull("GPG_key_id"), - propertyOrEnvOrNull("GPG_private_key") ?: return@signing, - propertyOrEnv("GPG_private_password") - ) - sign(publishing.publications) -} - -publishing { - setupAllPublications(project) -} - dependencies { api(project(":refreshVersions-core")) @@ -60,20 +39,14 @@ dependencies { } -tasks.withType().configureEach { - kotlinOptions.jvmTarget = "1.8" - kotlinOptions.freeCompilerArgs += listOf( - "-Xopt-in=kotlin.RequiresOptIn", - "-Xopt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi" - ) +kotlin { + jvmToolchain(8) + compilerOptions { + apiVersion = KotlinVersion.KOTLIN_1_8 // https://docs.gradle.org/current/userguide/compatibility.html#kotlin + freeCompilerArgs.add("-opt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi") + } } tasks.withType().configureEach { useJUnitPlatform() } - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - withSourcesJar() -} diff --git a/plugins/convention-plugins/build.gradle.kts b/plugins/convention-plugins/build.gradle.kts new file mode 100644 index 000000000..1d87f13ef --- /dev/null +++ b/plugins/convention-plugins/build.gradle.kts @@ -0,0 +1,9 @@ +plugins { + `kotlin-dsl` +} + +fun plugin(id: String, version: String) = "$id:$id.gradle.plugin:$version" + +dependencies { + implementation(plugin(id = "com.gradle.plugin-publish", version = "_")) +} diff --git a/plugins/convention-plugins/settings.gradle.kts b/plugins/convention-plugins/settings.gradle.kts new file mode 100644 index 000000000..1fea7bcda --- /dev/null +++ b/plugins/convention-plugins/settings.gradle.kts @@ -0,0 +1,15 @@ +plugins { + id("de.fayard.refreshVersions") version "0.60.3" +} + +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { + mavenCentral() + gradlePluginPortal() + } +} + +refreshVersions { + versionsPropertiesFile = rootDir.parentFile.resolve("versions.properties") +} diff --git a/plugins/buildSrc/src/main/kotlin/PropertyOrEnv.kt b/plugins/convention-plugins/src/main/kotlin/PropertyOrEnv.kt similarity index 69% rename from plugins/buildSrc/src/main/kotlin/PropertyOrEnv.kt rename to plugins/convention-plugins/src/main/kotlin/PropertyOrEnv.kt index 84918e88c..5bf2e76a0 100644 --- a/plugins/buildSrc/src/main/kotlin/PropertyOrEnv.kt +++ b/plugins/convention-plugins/src/main/kotlin/PropertyOrEnv.kt @@ -1,11 +1,11 @@ import org.gradle.api.Project -fun Project.propertyOrEnv(key: String): String { +internal fun Project.propertyOrEnv(key: String): String { return findProperty(key) as String? ?: System.getenv(key) ?: error("Didn't find any value for the key \"$key\" in Project properties or environment variables.") } -fun Project.propertyOrEnvOrNull(key: String): String? { +internal fun Project.propertyOrEnvOrNull(key: String): String? { return findProperty(key) as String? ?: System.getenv(key) } diff --git a/plugins/convention-plugins/src/main/kotlin/gradle-plugin.gradle.kts b/plugins/convention-plugins/src/main/kotlin/gradle-plugin.gradle.kts new file mode 100644 index 000000000..9802b9817 --- /dev/null +++ b/plugins/convention-plugins/src/main/kotlin/gradle-plugin.gradle.kts @@ -0,0 +1,22 @@ +plugins { + id("com.gradle.plugin-publish") + signing +} + +signing { + useInMemoryPgpKeys( + propertyOrEnvOrNull("GPG_key_id"), + propertyOrEnvOrNull("GPG_private_key") ?: return@signing, + propertyOrEnv("GPG_private_password") + ) + sign(publishing.publications) +} + +gradlePlugin { + website = Publishing.siteUrl + vcsUrl = Publishing.repoUrl +} + +publishing { + setupAllPublications(project) +} diff --git a/plugins/buildSrc/src/main/kotlin/publishing/Publishing.kt b/plugins/convention-plugins/src/main/kotlin/publishing/Publishing.kt similarity index 58% rename from plugins/buildSrc/src/main/kotlin/publishing/Publishing.kt rename to plugins/convention-plugins/src/main/kotlin/publishing/Publishing.kt index 6fbfa71e0..a87797187 100644 --- a/plugins/buildSrc/src/main/kotlin/publishing/Publishing.kt +++ b/plugins/convention-plugins/src/main/kotlin/publishing/Publishing.kt @@ -1,28 +1,20 @@ @file:Suppress("PackageDirectoryMismatch") import org.gradle.api.Project -import org.gradle.api.UnknownTaskException import org.gradle.api.publish.PublishingExtension import org.gradle.api.publish.maven.MavenPublication -import org.gradle.api.tasks.TaskContainer -import org.gradle.api.tasks.TaskProvider -import org.gradle.jvm.tasks.Jar -import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.register +import org.gradle.kotlin.dsl.assign import org.gradle.kotlin.dsl.withType -object Publishing { +internal object Publishing { const val gitUrl = "https://github.com/Splitties/refreshVersions.git" - const val siteUrl = "https://github.com/Splitties/refreshVersions" + const val siteUrl = "https://splitties.github.io/refreshVersions/" + const val repoUrl = "https://github.com/Splitties/refreshVersions" const val libraryDesc = "Life is too short to Google for dependencies and versions." } -fun PublishingExtension.setupAllPublications(project: Project) { - val mavenPublications = publications.withType() - mavenPublications.configureEach { - artifact(project.tasks.emptyJavadocJar()) - setupPom() - } +internal fun PublishingExtension.setupAllPublications(project: Project) { + publications.withType().configureEach { setupPom() } if (project.isSnapshot) { sonatypeSnapshotsPublishing(project = project) } @@ -39,16 +31,6 @@ fun PublishingExtension.setupAllPublications(project: Project) { } } -fun TaskContainer.emptyJavadocJar(): TaskProvider { - val taskName = "javadocJar" - return try { - named(name = taskName) - } catch (e: UnknownTaskException) { - register(name = taskName) { archiveClassifier by "javadoc" } - } -} - - private fun Project.registerPublishingTask() { require(project != rootProject) @@ -71,32 +53,31 @@ private fun Project.registerPublishingTask() { private val Project.isDevVersion get() = version.let { it is String && it.contains("-dev-") } private val Project.isSnapshot get() = version.let { it is String && it.endsWith("-SNAPSHOT") } -@Suppress("UnstableApiUsage") private fun MavenPublication.setupPom() = pom { - name.set("refreshVersions") - description.set(Publishing.libraryDesc) - url.set(Publishing.siteUrl) + name = "refreshVersions" + description = Publishing.libraryDesc + url = Publishing.siteUrl licenses { license { - name.set("MIT License") - url.set("https://opensource.org/licenses/MIT") + name = "MIT License" + url = "https://opensource.org/licenses/MIT" } } developers { developer { - id.set("jmfayard") - name.set("Jean-Michel Fayard") - email.set("jmfayard@gmail.com") + id = "jmfayard" + name = "Jean-Michel Fayard" + email = "jmfayard@gmail.com" } developer { - id.set("louiscad") - name.set("Louis CAD") - email.set("louis.cognault@gmail.com") + id = "louiscad" + name = "Louis CAD" + email = "louis.cognault@gmail.com" } } scm { - connection.set(Publishing.gitUrl) - developerConnection.set(Publishing.gitUrl) - url.set(Publishing.siteUrl) + connection = Publishing.gitUrl + developerConnection = Publishing.gitUrl + url = Publishing.repoUrl } } diff --git a/plugins/buildSrc/src/main/kotlin/publishing/SonatypePublishing.kt b/plugins/convention-plugins/src/main/kotlin/publishing/SonatypePublishing.kt similarity index 91% rename from plugins/buildSrc/src/main/kotlin/publishing/SonatypePublishing.kt rename to plugins/convention-plugins/src/main/kotlin/publishing/SonatypePublishing.kt index e444e9f1d..9c8be97ef 100644 --- a/plugins/buildSrc/src/main/kotlin/publishing/SonatypePublishing.kt +++ b/plugins/convention-plugins/src/main/kotlin/publishing/SonatypePublishing.kt @@ -5,7 +5,7 @@ import org.gradle.api.publish.PublishingExtension import java.net.URI -fun PublishingExtension.mavenCentralStagingPublishing( +internal fun PublishingExtension.mavenCentralStagingPublishing( project: Project, sonatypeUsername: String? = project.propertyOrEnvOrNull("sonatype_username"), sonatypePassword: String? = project.propertyOrEnvOrNull("sonatype_password"), @@ -26,7 +26,7 @@ fun PublishingExtension.mavenCentralStagingPublishing( } } -fun PublishingExtension.sonatypeSnapshotsPublishing( +internal fun PublishingExtension.sonatypeSnapshotsPublishing( project: Project, sonatypeUsername: String? = project.propertyOrEnvOrNull("sonatype_username"), sonatypePassword: String? = project.propertyOrEnvOrNull("sonatype_password") diff --git a/plugins/core/build.gradle.kts b/plugins/core/build.gradle.kts index cca184ecf..c33314eff 100644 --- a/plugins/core/build.gradle.kts +++ b/plugins/core/build.gradle.kts @@ -1,13 +1,11 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion +import org.splitties.gradle.VersionFileWriter +import org.splitties.gradle.putVersionInCode plugins { - id("com.gradle.plugin-publish") - `java-gradle-plugin` + id("gradle-plugin") `java-test-fixtures` - `maven-publish` - signing `kotlin-dsl` - idea } gradlePlugin { @@ -16,30 +14,12 @@ gradlePlugin { id = "de.fayard.refreshVersions-core" displayName = "./gradlew refreshVersions" description = "Painless dependencies management" + tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") implementationClass = "de.fayard.refreshVersions.core.RefreshVersionsCorePlugin" } } } -pluginBundle { - website = "https://jmfayard.github.io/refreshVersions" - vcsUrl = "https://github.com/jmfayard/refreshVersions" - tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") -} - -signing { - useInMemoryPgpKeys( - propertyOrEnvOrNull("GPG_key_id"), - propertyOrEnvOrNull("GPG_private_key") ?: return@signing, - propertyOrEnv("GPG_private_password") - ) - sign(publishing.publications) -} - -publishing { - setupAllPublications(project) -} - dependencies { compileOnly(gradleKotlinDsl()) implementation(KotlinX.coroutines.core) @@ -75,44 +55,27 @@ kotlin { javaComponent.withVariantsFromConfiguration(configurations["testFixturesRuntimeElements"]) { skip() } } -val genResourcesDir = buildDir.resolve("generated/refreshVersions/resources") - sourceSets.main { - resources.srcDir(genResourcesDir.path) -} - -idea { - module.generatedSourceDirs.add(genResourcesDir) + kotlin.srcDir("build/gen") } -val copyVersionFile by tasks.registering { - val versionFile = rootProject.file("version.txt") - val versionFileCopy = genResourcesDir.resolve("version.txt") - inputs.file(versionFile) - outputs.file(versionFileCopy) - doFirst { versionFile.copyTo(versionFileCopy, overwrite = true) } -} -tasks.processResources { - dependsOn(copyVersionFile) -} - -tasks.withType().configureEach { - kotlinOptions.jvmTarget = "1.8" - kotlinOptions.apiVersion = "1.5" - kotlinOptions.freeCompilerArgs += listOf( - "-Xmulti-platform", // Allow using expect and actual keywords. - "-opt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi" +putVersionInCode( + outputDirectory = layout.dir(provider { file("build/gen") }), + writer = VersionFileWriter.Kotlin( + fileName = "PluginVersion.kt", + `package` = "de.fayard.refreshVersions", + propertyName = "thisProjectVersion" ) +) + +kotlin { + jvmToolchain(8) + compilerOptions { + apiVersion = KotlinVersion.KOTLIN_1_8 // https://docs.gradle.org/current/userguide/compatibility.html#kotlin + freeCompilerArgs.add("-opt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi") + } } tasks.withType().configureEach { useJUnitPlatform() } - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - withSourcesJar() -} - -tasks.named("sourcesJar").configure { dependsOn(copyVersionFile) } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/DependencyNotations.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/DependencyNotations.kt index ad02926b4..3626a4b1e 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/DependencyNotations.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/DependencyNotations.kt @@ -208,7 +208,7 @@ sealed class AbstractDependencyGroup( private val usePlatformConstraintsInitialValue = usePlatformConstraints - private val rule: List? + private val rules: List? get() = rawRules?.lines()?.also { lines -> assert(lines.size % 2 == 0) { "An even number of lines was expected, but ${lines.size} were found: $lines" @@ -225,8 +225,8 @@ sealed class AbstractDependencyGroup( private val ALL = mutableListOf() @InternalRefreshVersionsApi - val ALL_RULES: List - get() = ALL.flatMap { it.rule ?: emptyList() } + val ALL_RULES: Sequence + get() = ALL.asSequence().flatMap { it.rules ?: emptyList() } @InternalRefreshVersionsApi var disableBomCheck: Boolean = false diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/MissingVersionEntries.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/MissingVersionEntries.kt index d6e36eac6..2956aa1a2 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/MissingVersionEntries.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/MissingVersionEntries.kt @@ -40,7 +40,7 @@ fun Configuration.countDependenciesWithHardcodedVersions( @InternalRefreshVersionsApi fun Project.countDependenciesWithHardcodedVersions(versionsMap: Map): Int { val versionKeyReader = RefreshVersionsConfigHolder.versionKeyReader - return (buildscript.configurations + configurations).sumBy { configuration -> + return (buildscript.configurations + configurations).sumOf { configuration -> if (configuration.shouldBeIgnored()) 0 else { configuration.countDependenciesWithHardcodedVersions(versionsMap, versionKeyReader) } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCleanupTask.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCleanupTask.kt index e3d622872..d50e2b3cc 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCleanupTask.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCleanupTask.kt @@ -4,7 +4,6 @@ import de.fayard.refreshVersions.core.internal.OutputFile import de.fayard.refreshVersions.core.internal.RefreshVersionsConfigHolder import de.fayard.refreshVersions.core.internal.SettingsPluginsUpdater.removeCommentsAddedByUs import de.fayard.refreshVersions.core.internal.VersionsCatalogUpdater -import de.fayard.refreshVersions.core.internal.VersionsCatalogs import de.fayard.refreshVersions.core.internal.VersionsCatalogs.LIBS_VERSIONS_TOML import de.fayard.refreshVersions.core.internal.versions.VersionsPropertiesModel import de.fayard.refreshVersions.core.internal.versions.VersionsPropertiesModel.Section @@ -74,7 +73,7 @@ open class RefreshVersionsCleanupTask : DefaultTask() { @TaskAction fun cleanUpVersionsCatalog() { - if (VersionsCatalogs.isSupported() && FeatureFlag.VERSIONS_CATALOG.isEnabled) { + if (FeatureFlag.VERSIONS_CATALOG.isEnabled) { val file = File(LIBS_VERSIONS_TOML) if (file.exists()) { VersionsCatalogUpdater(file, emptyList()).cleanupComments(file) diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCorePlugin.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCorePlugin.kt index fe5016ad8..69c1d4d18 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCorePlugin.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCorePlugin.kt @@ -6,6 +6,7 @@ import de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi import de.fayard.refreshVersions.core.internal.OutputFile import de.fayard.refreshVersions.core.internal.RefreshVersionsConfigHolder import de.fayard.refreshVersions.core.internal.VersionsCatalogs +import de.fayard.refreshVersions.thisProjectVersion import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.register @@ -20,7 +21,7 @@ open class RefreshVersionsCorePlugin : Plugin { OutputFile.init(project) val versionsFileName = RefreshVersionsConfigHolder.versionsPropertiesFile.name - val shouldUpdateVersionCatalogs = VersionsCatalogs.isSupported() && FeatureFlag.VERSIONS_CATALOG.isEnabled + val shouldUpdateVersionCatalogs = FeatureFlag.VERSIONS_CATALOG.isEnabled project.tasks.register(name = "refreshVersions") { group = "refreshVersions" description = "Search for new dependencies versions and update $versionsFileName" @@ -55,12 +56,13 @@ open class RefreshVersionsCorePlugin : Plugin { } private fun cleanFilesFromPreviousVersions(project: Project) { + val buildDir = project.layout.buildDirectory.asFile.get() if (project.isBuildSrc) { - project.buildDir.resolve("refreshVersions_used_dependencies.txt").delete() - project.buildDir.resolve("refreshVersions_used_repositories_maven.txt").delete() + buildDir.resolve("refreshVersions_used_dependencies.txt").delete() + buildDir.resolve("refreshVersions_used_repositories_maven.txt").delete() } else { - project.buildDir.resolve("refreshVersions_used_dependencies_plugins.txt").delete() - project.buildDir.resolve("refreshVersions_used_repositories_plugins_maven.txt").delete() + buildDir.resolve("refreshVersions_used_dependencies_plugins.txt").delete() + buildDir.resolve("refreshVersions_used_repositories_plugins_maven.txt").delete() } } @@ -72,10 +74,6 @@ open class RefreshVersionsCorePlugin : Plugin { @InternalRefreshVersionsApi companion object { - val currentVersion by lazy { - RefreshVersionsCorePlugin::class.java.getResourceAsStream("/version.txt")!! - .bufferedReader() - .useLines { it.first() } - } + val currentVersion = thisProjectVersion } } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCoreSetup.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCoreSetup.kt index 0400a46d7..91ce37051 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCoreSetup.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsCoreSetup.kt @@ -3,9 +3,15 @@ package de.fayard.refreshVersions.core import de.fayard.refreshVersions.core.extensions.gradle.isBuildSrc -import de.fayard.refreshVersions.core.internal.* +import de.fayard.refreshVersions.core.internal.DependencyMapping +import de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi +import de.fayard.refreshVersions.core.internal.RefreshVersionsConfigHolder +import de.fayard.refreshVersions.core.internal.UsedPluginsTracker +import de.fayard.refreshVersions.core.internal.UsedVersionForTracker import de.fayard.refreshVersions.core.internal.migrations.runMigrationsIfNeeded import de.fayard.refreshVersions.core.internal.removals_replacement.RemovedDependencyNotationsReplacementInfo +import de.fayard.refreshVersions.core.internal.resolveVersion +import de.fayard.refreshVersions.core.internal.setupVersionPlaceholdersResolving import org.gradle.api.artifacts.ExternalDependency import org.gradle.api.file.RegularFile import org.gradle.api.initialization.Settings @@ -128,7 +134,8 @@ fun Settings.bootstrapRefreshVersionsCoreForBuildSrc( setupRefreshVersions(settings = settings) } -private const val minimumGradleVersionString = "6.8" // Because we require Kotlin 1.4 +private const val minimumGradleVersionString = "8.0" // Because we require Kotlin 1.8 +// See https://docs.gradle.org/current/userguide/compatibility.html#kotlin private val minimumGradleVersion = GradleVersion.version(minimumGradleVersionString) /** diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsTask.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsTask.kt index 4a965e178..f2bc285be 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsTask.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/RefreshVersionsTask.kt @@ -79,7 +79,7 @@ open class RefreshVersionsTask : DefaultTask() { //TODO: Filter using known grouping strategies to only use the main artifact to resolve latest version, this // will reduce the number of repositories lookups, improving performance a little more. - val shouldUpdateVersionCatalogs = VersionsCatalogs.isSupported() && FeatureFlag.VERSIONS_CATALOG.isEnabled + val shouldUpdateVersionCatalogs = FeatureFlag.VERSIONS_CATALOG.isEnabled val versionsCatalogLibraries: Set diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/Version.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/Version.kt index b6d60302a..5f6888959 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/Version.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/Version.kt @@ -135,7 +135,7 @@ data class Version(val value: String) : Comparable { private val digitsOnlyBasedVersionNumberRegex = "^[0-9,.v-]+$".toRegex() private fun isDefinitelyStable(version: String): Boolean { - val uppercaseVersion = version.toUpperCase() + val uppercaseVersion = version.uppercase() val hasStableKeyword = knownStableKeywords.any { it in uppercaseVersion } return hasStableKeyword || digitsOnlyBasedVersionNumberRegex.matches(version) } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/gradle/Settings.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/gradle/Settings.kt index c37b5e821..44a7756ab 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/gradle/Settings.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/gradle/Settings.kt @@ -3,19 +3,13 @@ package de.fayard.refreshVersions.core.extensions.gradle import de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi import org.gradle.api.artifacts.repositories.ArtifactRepository import org.gradle.api.initialization.Settings -import org.gradle.util.GradleVersion @InternalRefreshVersionsApi val Settings.isBuildSrc: Boolean get() = rootProject.name == "buildSrc" internal val Settings.globalRepositories: List - get() = when { - GradleVersion.current().baseVersion >= gradle7 -> runCatching { - @Suppress("UnstableApiUsage") - dependencyResolutionManagement.repositories - }.onFailure { println(it) }.getOrDefault(emptyList()) - else -> emptyList() - } - -private val gradle7 = GradleVersion.version("7.0") + get() = runCatching { + @Suppress("UnstableApiUsage") + dependencyResolutionManagement.repositories + }.onFailure { println(it) }.getOrDefault(emptyList()) diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/text/CharSequence.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/text/CharSequence.kt index f3fdf855a..cff584ea9 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/text/CharSequence.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/extensions/text/CharSequence.kt @@ -1,7 +1,7 @@ package de.fayard.refreshVersions.core.extensions.text internal fun CharSequence.indexOfPrevious(char: Char, startIndex: Int): Int { - if (startIndex !in 0..lastIndex) throw IndexOutOfBoundsException(startIndex) + if (startIndex !in 0..lastIndex) throw IndexOutOfBoundsException("Index out of range: $startIndex") for (i in startIndex downTo 0) { val c = this[i] if (c == char) return i @@ -13,7 +13,7 @@ internal inline fun CharSequence.indexOfFirst( startIndex: Int, predicate: (Char) -> Boolean ): Int { - if (startIndex !in 0..lastIndex) throw IndexOutOfBoundsException(startIndex) + if (startIndex !in 0..lastIndex) throw IndexOutOfBoundsException("Index out of range: $startIndex") for (i in startIndex..lastIndex) { if (predicate(this[i])) return i } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/ArtifactVersionKeyRule.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/ArtifactVersionKeyRule.kt index d80f54108..fbc9b5dc5 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/ArtifactVersionKeyRule.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/ArtifactVersionKeyRule.kt @@ -5,8 +5,8 @@ package de.fayard.refreshVersions.core.internal */ @InternalRefreshVersionsApi abstract class ArtifactVersionKeyRule protected constructor( - internal val artifactPattern: String, - internal val versionKeyPattern: String + val artifactPattern: String, + val versionKeyPattern: String ) : Comparable { init { @@ -25,7 +25,9 @@ abstract class ArtifactVersionKeyRule protected constructor( final override fun compareTo(other: ArtifactVersionKeyRule) = comparator.compare(this, other) - private val versionKeySignificantCharsLength = versionKeyPattern.count { it != ' ' } + private val versionKeySignificantCharsLength = artifactPattern.count { + it !in " ()*" + } fun text(): String = """ $artifactPattern diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyNotations.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyNotations.kt index 2fc164bde..3b70bc7d8 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyNotations.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/DependencyNotations.kt @@ -45,7 +45,7 @@ fun escapeLibsKt(name: String): String { val escapedChars = listOf('-', '.', ':') return buildString { for (c in name) { - append(if (c in escapedChars) '_' else c.toLowerCase()) + append(if (c in escapedChars) '_' else c.lowercaseChar()) } } } @@ -57,9 +57,9 @@ fun Project.findDependencies(): List { (buildscript.configurations + configurations).flatMapTo(allDependencies) { configuration -> configuration.allDependencies .filterIsInstance() - .mapNotNull { dependency -> + .map { dependency -> Library( - group = dependency.group ?: return@mapNotNull null, + group = dependency.group, module = dependency.name, version = dependency.version ) diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/Tasks.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/Tasks.kt index 02b32cbf9..efa05b3b9 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/Tasks.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/Tasks.kt @@ -1,13 +1,10 @@ package de.fayard.refreshVersions.core.internal import org.gradle.api.Task -import org.gradle.util.GradleVersion @InternalRefreshVersionsApi fun Task.skipConfigurationCache() { - if (GradleVersion.current() < GradleVersion.version("7.4")) return try { - @Suppress("UnstableApiUsage") notCompatibleWithConfigurationCache("Task $name does not support Configuration Cache") // println("warning: task $name not compatible with the configuration cache.") } catch (t: Throwable) { diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/VersionsCatalogs.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/VersionsCatalogs.kt index 0db8089fa..eee51ed9f 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/VersionsCatalogs.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/VersionsCatalogs.kt @@ -8,17 +8,12 @@ import org.gradle.api.artifacts.MinimalExternalModuleDependency import org.gradle.api.artifacts.VersionCatalog import org.gradle.api.artifacts.VersionCatalogsExtension import org.gradle.kotlin.dsl.findByType -import org.gradle.util.GradleVersion @InternalRefreshVersionsApi object VersionsCatalogs { const val LIBS_VERSIONS_TOML = "gradle/libs.versions.toml" // Unrelated to the catalog name, never changes. - val minimumGradleVersion: GradleVersion = GradleVersion.version("7.4") - - fun isSupported(): Boolean = GradleVersion.current() >= minimumGradleVersion - fun defaultCatalogName(): String = try { RefreshVersionsConfigHolder.settings.dependencyResolutionManagement.defaultLibrariesExtensionName.get() } catch (t: Throwable) { diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/AnsiColor.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/AnsiColor.kt index 311020d37..e7946e22e 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/AnsiColor.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/AnsiColor.kt @@ -15,7 +15,7 @@ enum class AnsiColor(private val colorNumber: Byte) { companion object { private const val prefix = "\u001B" - private val isCompatible = "win" !in System.getProperty("os.name").toLowerCase() //TODO: Support PowerShell? + private val isCompatible = "win" !in System.getProperty("os.name").lowercase() //TODO: Support PowerShell? private inline fun ifCompatible(block: () -> String): String = if (isCompatible) block() else "" val RESET = ifCompatible { "$prefix[0m" } diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/CliGenericUi.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/CliGenericUi.kt index 108e4c1c0..c02c399ca 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/CliGenericUi.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/cli/CliGenericUi.kt @@ -25,7 +25,8 @@ interface CliGenericUi { } @InternalRefreshVersionsApi -inline class MenuEntryIndex(val value: Int) +@JvmInline +value class MenuEntryIndex(val value: Int) private class CliGenericUiImpl : CliGenericUi { diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModel.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModel.kt index 106674a3e..79f0000e3 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModel.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModel.kt @@ -6,20 +6,20 @@ import de.fayard.refreshVersions.core.internal.failures.oneLineSummary /** * @property dependencyNotationRemovalsRevision Designed to be used only for snapshot publications. */ -internal actual data class VersionsPropertiesModel( - actual val preHeaderContent: String, - actual val generatedByVersion: String, - actual val dependencyNotationRemovalsRevision: Int?, - actual val sections: List
+internal data class VersionsPropertiesModel( + val preHeaderContent: String, + val generatedByVersion: String, + val dependencyNotationRemovalsRevision: Int?, + val sections: List
) { init { if (preHeaderContent.isNotEmpty()) require(preHeaderContent.endsWith('\n')) preHeaderContent.lineSequence().forEach { if (it.isNotBlank()) it.mustBeACommentLine() } } - actual sealed class Section { + sealed class Section { - actual data class Comment(actual val lines: String) : Section() { + data class Comment(val lines: String) : Section() { init { lines.lineSequence().forEach { if (it.isNotBlank()) it.mustBeACommentLine() @@ -27,14 +27,14 @@ internal actual data class VersionsPropertiesModel( } } - actual data class VersionEntry( - actual val leadingCommentLines: List = emptyList(), - actual val key: String, - actual val currentVersion: String, - actual val availableUpdates: List, - actual val trailingCommentLines: List = emptyList() + data class VersionEntry( + val leadingCommentLines: List = emptyList(), + val key: String, + val currentVersion: String, + val availableUpdates: List, + val trailingCommentLines: List = emptyList() ) : Section() { - actual val metadataLines: List by lazy { + val metadataLines: List by lazy { leadingCommentLines.mapNotNull { it.substringAfter("## ", missingDelimiterValue = "").ifEmpty { null } } @@ -56,7 +56,7 @@ internal actual data class VersionsPropertiesModel( } } - actual companion object { + companion object { /** * We use 4 hashtags to simplify parsing as we can have up to 3 contiguous hashtags in the diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModelH.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModelH.kt index 00a827302..9f08d2812 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModelH.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesModelH.kt @@ -1,17 +1,17 @@ package de.fayard.refreshVersions.core.internal.versions -internal expect class VersionsPropertiesModel { +private interface VersionsPropertiesModelH { val preHeaderContent: String val generatedByVersion: String val dependencyNotationRemovalsRevision: Int? val sections: List
- sealed class Section { - class Comment : Section { + sealed interface Section { + interface Comment : Section { val lines: String } - class VersionEntry : Section { + interface VersionEntry : Section { val leadingCommentLines: List val key: String val currentVersion: String diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesReading.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesReading.kt index d6406e437..fea42e995 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesReading.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/versions/VersionsPropertiesReading.kt @@ -126,7 +126,7 @@ internal fun String.withEntriesLineBreaksIfMissing(): String { else -> line } }.asReversed() - ensureCapacity(lines.sumBy { it.length + 1 }) + ensureCapacity(lines.sumOf { it.length + 1 }) lines.joinTo(this, separator = "\n") } } diff --git a/plugins/dependencies/build.gradle.kts b/plugins/dependencies/build.gradle.kts index 6f7f3e812..896e3edb5 100644 --- a/plugins/dependencies/build.gradle.kts +++ b/plugins/dependencies/build.gradle.kts @@ -1,10 +1,7 @@ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion plugins { - id("com.gradle.plugin-publish") - `java-gradle-plugin` - `maven-publish` - signing + id("gradle-plugin") `kotlin-dsl` `jvm-test-suite` idea @@ -16,30 +13,12 @@ gradlePlugin { id = "de.fayard.refreshVersions" displayName = "Typesafe Gradle Dependencies" description = "Common Gradle dependencies - See gradle refreshVersions" + tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") implementationClass = "de.fayard.refreshVersions.RefreshVersionsPlugin" } } } -pluginBundle { - website = "https://jmfayard.github.io/refreshVersions" - vcsUrl = "https://github.com/jmfayard/refreshVersions" - tags = listOf("dependencies", "versions", "buildSrc", "kotlin", "kotlin-dsl") -} - -signing { - useInMemoryPgpKeys( - propertyOrEnvOrNull("GPG_key_id"), - propertyOrEnvOrNull("GPG_private_key") ?: return@signing, - propertyOrEnv("GPG_private_password") - ) - sign(publishing.publications) -} - -publishing { - setupAllPublications(project) -} - dependencies { testImplementation(Testing.kotest.runner.junit5) @@ -56,20 +35,20 @@ dependencies { implementation(KotlinX.coroutines.core) } -val genResourcesDir = buildDir.resolve("generated/refreshVersions/resources") +val genResourcesDir = layout.buildDirectory.dir("generated/refreshVersions/resources") sourceSets.main { - resources.srcDir(genResourcesDir.path) + resources.srcDir(genResourcesDir.get().asFile.path) } idea { - module.generatedSourceDirs.add(genResourcesDir) + module.generatedSourceDirs.add(genResourcesDir.get().asFile) } val copyDependencyNotationsRemovalsRevisionNumber by tasks.registering { val versionFile = rootProject.file("version.txt") val removalsRevisionHistoryFile = file("src/main/resources/removals-revisions-history.md") - val snapshotDependencyNotationsRemovalsRevisionNumberFile = genResourcesDir.resolve("snapshot-dpdc-rm-rev.txt") + val snapshotDependencyNotationsRemovalsRevisionNumberFile = genResourcesDir.get().file("snapshot-dpdc-rm-rev.txt").asFile val versionToRemovalsMappingFile = file("src/main/resources/version-to-removals-revision-mapping.txt") @@ -110,10 +89,16 @@ val copyDependencyNotationsRemovalsRevisionNumber by tasks.registering { } } -tasks.processResources { +tasks.processResources.configure { dependsOn(copyDependencyNotationsRemovalsRevisionNumber) } +afterEvaluate { + tasks.named("sourcesJar").configure { + dependsOn(copyDependencyNotationsRemovalsRevisionNumber) + } +} + @Suppress("UnstableApiUsage") val prePublishTest = testing.suites.create("prePublishTest") { useJUnitJupiter() @@ -138,22 +123,14 @@ tasks.withType().configureEach { dependsOn(prePublishTest) } -tasks.withType().configureEach { - kotlinOptions.jvmTarget = "1.8" - kotlinOptions.apiVersion = "1.5" - kotlinOptions.freeCompilerArgs += listOf( - "-opt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi" - ) +kotlin { + jvmToolchain(8) + compilerOptions { + apiVersion = KotlinVersion.KOTLIN_1_8 // https://docs.gradle.org/current/userguide/compatibility.html#kotlin + freeCompilerArgs.add("-opt-in=de.fayard.refreshVersions.core.internal.InternalRefreshVersionsApi") + } } tasks.withType().configureEach { useJUnitPlatform() } - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - withSourcesJar() -} - -tasks.named("sourcesJar").configure { dependsOn(copyDependencyNotationsRemovalsRevisionNumber) } diff --git a/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/RefreshVersionsMigrateTask.kt b/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/RefreshVersionsMigrateTask.kt index 6192ae762..50c2b84a5 100644 --- a/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/RefreshVersionsMigrateTask.kt +++ b/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/RefreshVersionsMigrateTask.kt @@ -261,7 +261,7 @@ internal fun findFilesWithDependencyNotations(fromDir: File): List { return fromDir.walkBottomUp() .onEnter { dir -> dir.name !in listOf("resources", "build") } .filter { - it.extension in expectedExtensions && it.nameWithoutExtension.toLowerCase() in expectedNames + it.extension in expectedExtensions && it.nameWithoutExtension.lowercase() in expectedNames }.toList() } diff --git a/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/internal/VersionsCatalogGeneration.kt b/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/internal/VersionsCatalogGeneration.kt index c687f019c..05ae4a7c9 100644 --- a/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/internal/VersionsCatalogGeneration.kt +++ b/plugins/dependencies/src/main/kotlin/de/fayard/refreshVersions/internal/VersionsCatalogGeneration.kt @@ -12,10 +12,8 @@ import de.fayard.refreshVersions.core.internal.VersionsCatalogs import de.fayard.refreshVersions.core.internal.checkModeAndNames import de.fayard.refreshVersions.core.internal.computeAliases import de.fayard.refreshVersions.core.internal.findDependencies -import org.gradle.api.GradleException import org.gradle.api.Project import org.gradle.api.artifacts.Dependency -import org.gradle.util.GradleVersion /** * Returns the mapping of the generated catalog: moduleId to dependency alias. @@ -25,15 +23,6 @@ internal fun generateVersionsCatalogFromCurrentDependencies( keepVersionsPlaceholders: Boolean, copyBuiltInDependencyNotationsToCatalog: Boolean ): Map { - if (VersionsCatalogs.isSupported().not()) { - throw GradleException( - """ - |Gradle versions catalogs are not supported in ${GradleVersion.current()} - |Upgrade Gradle with this command - | ./gradlew wrapper --gradle-version ${VersionsCatalogs.minimumGradleVersion.version} - """.trimMargin() - ) - } // Update versions.properties addMissingEntriesInVersionsProperties(project) diff --git a/plugins/dependencies/src/main/resources/refreshVersions-rules/dependency-groups-alias-rules.txt b/plugins/dependencies/src/main/resources/refreshVersions-rules/dependency-groups-alias-rules.txt index 3e038423f..6c3cb6186 100644 --- a/plugins/dependencies/src/main/resources/refreshVersions-rules/dependency-groups-alias-rules.txt +++ b/plugins/dependencies/src/main/resources/refreshVersions-rules/dependency-groups-alias-rules.txt @@ -1,60 +1,63 @@ -io.insert-koin:koin-* - ^^^^ - -io.ktor:* - ^^^^ - -io.arrow-kt:arrow-* - ^^^^^ - co.touchlab:kermit(-*) ^^^^^^ -io.github.javaeden.orchid:* - ^^^^^^ - -org.http4k:http4k-* - ^^^^^^ - co.touchlab:stately-* ^^^^^^^ +com.android.billingclient:billing(-*) + ^^^^^^^^^^^^^^^^^^^^^ + +com.android.tools:* + ^^^^^^^^^^^^^.^ + +com.apollographql.apollo3:apollo-* + ^^^^^^^^^^^^^ + com.github.chuckerteam.chucker:library(-*) ^^^^^^^ +com.google.android.horologist:* + ^^^^^^^ ^^^^^^^^^^ + +com.louiscad.splitties:splitties-* + ^^^^^^^^^ + +com.rickclephas.kmp:kmp-nativecoroutines(-*) + ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ + +com.russhwolf:multiplatform-settings(-*) + ^^^^^^^^^^^^^^^^^^^^^^ + +io.arrow-kt.analysis.kotlin:io.arrow-kt.analysis.kotlin.* +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +io.arrow-kt:arrow-* + ^^^^^ + io.coil-kt:coil(-*) ^^^^^^^ -org.hamcrest:hamcrest(-*) - ^^^^^^^^ +io.github.javaeden.orchid:* + ^^^^^^ -com.louiscad.splitties:splitties-* - ^^^^^^^^^ +io.insert-koin:koin-* + ^^^^ + +io.ktor:* + ^^^^ org.assertj:assertj-* ^^^^^^^.^ -org.kodein.di:kodein-di(-*) - ^^^^^^^^^ +org.hamcrest:hamcrest(-*) + ^^^^^^^^ -com.apollographql.apollo3:apollo-* - ^^^^^^^^^^^^^ +org.http4k:http4k-* + ^^^^^^ org.http4k:http4k-connect-* ^^^^^^^^^^^^^^ -org.jetbrains.kotlinx:multik(-*) - ^^^^^^^.^^^^^^ - -com.android.tools:* - ^^^^^^^^^^^^^.^ - -org.jetbrains.kotlinx:lincheck(-*) - ^^^^^^^.^^^^^^^^ - -com.google.android.horologist:* - ^^^^^^^ ^^^^^^^^^^ - org.jetbrains.exposed:exposed-* ^^^^^^^^^.^^^^^^^ @@ -64,14 +67,11 @@ org.jetbrains.kotlinx:dataframe(-*) org.jetbrains.kotlinx:kotlin-deeplearning(-*) ^^^^^^^. ^^^^^^^^^^^^ -com.android.billingclient:billing(-*) - ^^^^^^^^^^^^^^^^^^^^^ - -com.russhwolf:multiplatform-settings(-*) - ^^^^^^^^^^^^^^^^^^^^^^ +org.jetbrains.kotlinx:lincheck(-*) + ^^^^^^^.^^^^^^^^ -io.arrow-kt.analysis.kotlin:io.arrow-kt.analysis.kotlin.* -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +org.jetbrains.kotlinx:multik(-*) + ^^^^^^^.^^^^^^ -com.rickclephas.kmp:kmp-nativecoroutines(-*) - ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ +org.kodein.di:kodein-di(-*) + ^^^^^^^^^ diff --git a/plugins/dependencies/src/main/resources/removed-dependencies-versions-keys.txt b/plugins/dependencies/src/main/resources/removed-dependencies-versions-keys.txt index 8a9a31939..f5d274ee6 100644 --- a/plugins/dependencies/src/main/resources/removed-dependencies-versions-keys.txt +++ b/plugins/dependencies/src/main/resources/removed-dependencies-versions-keys.txt @@ -132,3 +132,8 @@ com.google.accompanist..accompanist-placeholder=version.google.accompanist com.google.accompanist..accompanist-swiperefresh=version.google.accompanist com.google.accompanist..accompanist-systemuicontroller=version.google.accompanist com.google.accompanist..accompanist-webview=version.google.accompanist +androidx.wear.compose..compose-foundation=version.androidx.wear.compose.compose-foundation +androidx.wear.compose..compose-material3=version.androidx.wear.compose.compose-material3 +androidx.wear.compose..compose-material=version.androidx.wear.compose.compose-material +androidx.wear.compose..compose-navigation=version.androidx.wear.compose.compose-navigation +androidx.wear.compose..compose-ui-tooling=version.androidx.wear.compose.compose-ui-tooling diff --git a/plugins/dependencies/src/main/resources/version-to-removals-revision-mapping.txt b/plugins/dependencies/src/main/resources/version-to-removals-revision-mapping.txt index a9691f066..f9d306354 100644 --- a/plugins/dependencies/src/main/resources/version-to-removals-revision-mapping.txt +++ b/plugins/dependencies/src/main/resources/version-to-removals-revision-mapping.txt @@ -13,3 +13,4 @@ 0.60.1->17 0.60.2->19 0.60.3->19 +0.60.4->19 diff --git a/plugins/dependencies/src/test/kotlin/de/fayard/refreshVersions/BundledDependenciesTest.kt b/plugins/dependencies/src/test/kotlin/de/fayard/refreshVersions/BundledDependenciesTest.kt index 2fe9b0b60..2c38d1928 100644 --- a/plugins/dependencies/src/test/kotlin/de/fayard/refreshVersions/BundledDependenciesTest.kt +++ b/plugins/dependencies/src/test/kotlin/de/fayard/refreshVersions/BundledDependenciesTest.kt @@ -85,7 +85,7 @@ class BundledDependenciesTest { ALL_DEPENDENCIES_NOTATIONS // Ensure all objects are initialized. val file = Files.rules val content = AbstractDependencyGroup.ALL_RULES - .sorted() + .sortedBy { it.artifactPattern } .distinct() .joinToString(separator = "\n\n", postfix = "\n") { it.text() } if (file.readText() != content) file.writeText(content) diff --git a/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt b/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt index 6d9993f4b..5113dbe82 100644 --- a/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt +++ b/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt @@ -339,11 +339,11 @@ androidx.wear..wear-ongoing=version.androidx.wear-ongoing androidx.wear..wear-phone-interactions=version.androidx.wear-phone-interactions androidx.wear..wear-remote-interactions=version.androidx.wear-remote-interactions androidx.wear..wear=version.androidx.wear -androidx.wear.compose..compose-foundation=version.androidx.wear.compose.compose-foundation -androidx.wear.compose..compose-material3=version.androidx.wear.compose.compose-material3 -androidx.wear.compose..compose-material=version.androidx.wear.compose.compose-material -androidx.wear.compose..compose-navigation=version.androidx.wear.compose.compose-navigation -androidx.wear.compose..compose-ui-tooling=version.androidx.wear.compose.compose-ui-tooling +androidx.wear.compose..compose-foundation=version.androidx.wear.compose +androidx.wear.compose..compose-material3=version.androidx.wear.compose +androidx.wear.compose..compose-material=version.androidx.wear.compose +androidx.wear.compose..compose-navigation=version.androidx.wear.compose +androidx.wear.compose..compose-ui-tooling=version.androidx.wear.compose androidx.wear.protolayout..protolayout-expression=version.androidx.wear.protolayout androidx.wear.protolayout..protolayout-material=version.androidx.wear.protolayout androidx.wear.protolayout..protolayout-renderer=version.androidx.wear.protolayout diff --git a/plugins/gradle/wrapper/gradle-wrapper.jar b/plugins/gradle/wrapper/gradle-wrapper.jar index 033e24c4c..7f93135c4 100644 Binary files a/plugins/gradle/wrapper/gradle-wrapper.jar and b/plugins/gradle/wrapper/gradle-wrapper.jar differ diff --git a/plugins/gradle/wrapper/gradle-wrapper.properties b/plugins/gradle/wrapper/gradle-wrapper.properties index 164080a81..1af9e0930 100644 --- a/plugins/gradle/wrapper/gradle-wrapper.properties +++ b/plugins/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/plugins/gradlew b/plugins/gradlew index fcb6fca14..1aa94a426 100755 --- a/plugins/gradlew +++ b/plugins/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# 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 # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -201,11 +202,11 @@ fi # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/plugins/settings.gradle.kts b/plugins/settings.gradle.kts index 3ce43b4e5..42208b810 100644 --- a/plugins/settings.gradle.kts +++ b/plugins/settings.gradle.kts @@ -1,6 +1,16 @@ +pluginManagement { + includeBuild("convention-plugins") +} + plugins { id("com.gradle.enterprise").version("3.8.1") - id("de.fayard.refreshVersions") version "0.40.0" + id("de.fayard.refreshVersions") version "0.60.3" + id("org.splitties.version-sync") version "0.2.6" +} + +dependencyResolutionManagement { + @Suppress("UnstableApiUsage") + repositories { mavenCentral() } } gradleEnterprise { @@ -11,12 +21,12 @@ gradleEnterprise { } } -val pluginsVersion: String = file("version.txt").bufferedReader().use { it.readLine() } +gradle.rootProject { + loadLocalProperties() +} gradle.beforeProject { - version = pluginsVersion group = "de.fayard.refreshVersions" - loadLocalProperties() } include("core", "dependencies", "buildSrcLibs") diff --git a/plugins/version.txt b/plugins/version.txt index 365525dbe..3cc75305f 100644 --- a/plugins/version.txt +++ b/plugins/version.txt @@ -1 +1 @@ -0.60.3 \ No newline at end of file +0.60.4 diff --git a/plugins/versions.properties b/plugins/versions.properties index a8dd9a837..23e2efb9b 100644 --- a/plugins/versions.properties +++ b/plugins/versions.properties @@ -1,5 +1,5 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.40.0 +#### Generated by `./gradlew refreshVersions` version 0.60.3 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. @@ -7,18 +7,21 @@ #### suppress inspection "SpellCheckingInspection" for whole file #### suppress inspection "UnusedProperty" for whole file -plugin.com.gradle.plugin-publish=0.20.0 -## # available=0.21.0 -## # available=1.0.0-rc-1 -## # available=1.0.0-rc-2 -## # available=1.0.0-rc-3 -## # available=1.0.0 +plugin.com.gradle.plugin-publish=1.2.1 version.junit=5.8.1 ### available=5.8.2 ### available=5.9.0-M1 ### available=5.9.0-RC1 ### available=5.9.0 +### available=5.9.1 +### available=5.9.2 +### available=5.9.3 +### available=5.10.0-M1 +### available=5.10.0-RC1 +### available=5.10.0-RC2 +### available=5.10.0 +### available=5.10.1 version.kotest=4.6.3 ## # available=4.6.4 @@ -41,45 +44,39 @@ version.kotest=4.6.3 ## # available=5.3.1 ## # available=5.3.2 ## # available=5.4.0 +## # available=5.4.1 +## # available=5.4.2 +## # available=5.5.0 +## # available=5.5.1 +## # available=5.5.2 +## # available=5.5.3 +## # available=5.5.4 +## # available=5.5.5 +## # available=5.6.0 +## # available=5.6.1 +## # available=5.6.2 +## # available=5.7.0 +## # available=5.7.1 +## # available=5.7.2 +## # available=5.8.0 -version.kotlin=1.4.20 -## # available=1.4.21 -## # available=1.4.21-2 -## # available=1.4.30-M1 -## # available=1.4.30-RC -## # available=1.4.30 -## # available=1.4.31 -## # available=1.4.32 -## # available=1.5.0-M1 -## # available=1.5.0-M2 -## # available=1.5.0-RC -## # available=1.5.0 -## # available=1.5.10 -## # available=1.5.20-M1 -## # available=1.5.20-RC -## # available=1.5.20 -## # available=1.5.21 -## # available=1.5.30-M1 -## # available=1.5.30-RC -## # available=1.5.30 -## # available=1.5.31 -## # available=1.5.32 -## # available=1.6.0-M1 -## # available=1.6.0-RC -## # available=1.6.0-RC2 -## # available=1.6.0 -## # available=1.6.10-RC -## # available=1.6.10 -## # available=1.6.20-M1 -## # available=1.6.20-RC -## # available=1.6.20-RC2 -## # available=1.6.20 -## # available=1.6.21 -## # available=1.7.0-Beta -## # available=1.7.0-RC -## # available=1.7.0-RC2 -## # available=1.7.0 -## # available=1.7.10 +version.kotlin=1.8.10 +## # available=1.8.20-Beta +## # available=1.8.20-RC +## # available=1.8.20-RC2 +## # available=1.8.20 +## # available=1.8.21 +## # available=1.8.22 +## # available=1.9.0-Beta +## # available=1.9.0-RC +## # available=1.9.0 +## # available=1.9.10 +## # available=1.9.20-Beta +## # available=1.9.20-Beta2 +## # available=1.9.20-RC +## # available=1.9.20-RC2 +## # available=1.9.20 +## # available=2.0.0-Beta1 version.kotlinpoet=1.7.2 ## # available=1.8.0 @@ -89,22 +86,22 @@ version.kotlinpoet=1.7.2 ## # available=1.10.2 ## # available=1.11.0 ## # available=1.12.0 +## # available=1.13.0 +## # available=1.13.1 +## # available=1.13.2 +## # available=1.14.0 +## # available=1.14.1 +## # available=1.14.2 -version.kotlinx.coroutines=1.6.0 -## # available=1.6.1-native-mt -## # available=1.6.1 -## # available=1.6.2 -## # available=1.6.3-native-mt -## # available=1.6.3 -## # available=1.6.4 +version.kotlinx.coroutines=1.7.3 version.moshi=1.11.0 ### available=1.12.0 ### available=1.13.0 +### available=1.14.0 +### available=1.15.0 -version.okhttp3=4.9.3 -## # available=4.10.0-RC1 -## # available=4.10.0 +version.okhttp3=4.12.0 ## # available=5.0.0-alpha.1 ## # available=5.0.0-alpha.2 ## # available=5.0.0-alpha.3 @@ -115,5 +112,6 @@ version.okhttp3=4.9.3 ## # available=5.0.0-alpha.8 ## # available=5.0.0-alpha.9 ## # available=5.0.0-alpha.10 +## # available=5.0.0-alpha.11 version.retrofit2=2.9.0 diff --git a/sample-groovy/gradle/wrapper/gradle-wrapper.jar b/sample-groovy/gradle/wrapper/gradle-wrapper.jar index 249e5832f..7f93135c4 100644 Binary files a/sample-groovy/gradle/wrapper/gradle-wrapper.jar and b/sample-groovy/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sample-groovy/gradle/wrapper/gradle-wrapper.properties b/sample-groovy/gradle/wrapper/gradle-wrapper.properties index ae04661ee..1af9e0930 100644 --- a/sample-groovy/gradle/wrapper/gradle-wrapper.properties +++ b/sample-groovy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample-groovy/gradlew b/sample-groovy/gradlew index a69d9cb6c..1aa94a426 100755 --- a/sample-groovy/gradlew +++ b/sample-groovy/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# 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 # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/sample-groovy/gradlew.bat b/sample-groovy/gradlew.bat index f127cfd49..93e3f59f1 100644 --- a/sample-groovy/gradlew.bat +++ b/sample-groovy/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/sample-groovy/settings.gradle b/sample-groovy/settings.gradle index 04bda98de..9fedadc43 100644 --- a/sample-groovy/settings.gradle +++ b/sample-groovy/settings.gradle @@ -13,8 +13,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise").version("3.10.2") -//// # available:"3.10.3") + id("com.gradle.enterprise").version("3.15.1") id 'de.fayard.refreshVersions' } diff --git a/sample-groovy/versions.properties b/sample-groovy/versions.properties index 2ee62d231..353fbdc28 100644 --- a/sample-groovy/versions.properties +++ b/sample-groovy/versions.properties @@ -1,6 +1,6 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.52.0-SNAPSHOT -#### Revision of dependency notations removals: 15 +#### Generated by `./gradlew refreshVersions` version 0.60.4-SNAPSHOT +#### Revision of dependency notations removals: 19 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. diff --git a/sample-kotlin-js/settings.gradle.kts b/sample-kotlin-js/settings.gradle.kts index b9b695fe9..f13fec074 100644 --- a/sample-kotlin-js/settings.gradle.kts +++ b/sample-kotlin-js/settings.gradle.kts @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise").version("3.8") + id("com.gradle.enterprise").version("3.15.1") id("de.fayard.refreshVersions") } diff --git a/sample-kotlin-js/versions.properties b/sample-kotlin-js/versions.properties index 872672535..389b76a59 100644 --- a/sample-kotlin-js/versions.properties +++ b/sample-kotlin-js/versions.properties @@ -1,6 +1,6 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.41.0-SNAPSHOT -#### Revision of dependency notations removals: 11 +#### Generated by `./gradlew refreshVersions` version 0.60.4-SNAPSHOT +#### Revision of dependency notations removals: 19 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. diff --git a/sample-kotlin/gradle/wrapper/gradle-wrapper.jar b/sample-kotlin/gradle/wrapper/gradle-wrapper.jar index 249e5832f..7f93135c4 100644 Binary files a/sample-kotlin/gradle/wrapper/gradle-wrapper.jar and b/sample-kotlin/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sample-kotlin/gradle/wrapper/gradle-wrapper.properties b/sample-kotlin/gradle/wrapper/gradle-wrapper.properties index ae04661ee..1af9e0930 100644 --- a/sample-kotlin/gradle/wrapper/gradle-wrapper.properties +++ b/sample-kotlin/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample-kotlin/gradlew b/sample-kotlin/gradlew index a69d9cb6c..1aa94a426 100755 --- a/sample-kotlin/gradlew +++ b/sample-kotlin/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# 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 # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ diff --git a/sample-kotlin/gradlew.bat b/sample-kotlin/gradlew.bat index f127cfd49..93e3f59f1 100644 --- a/sample-kotlin/gradlew.bat +++ b/sample-kotlin/gradlew.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% diff --git a/sample-kotlin/settings.gradle.kts b/sample-kotlin/settings.gradle.kts index 476b71e1c..473b28843 100644 --- a/sample-kotlin/settings.gradle.kts +++ b/sample-kotlin/settings.gradle.kts @@ -17,7 +17,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise").version("3.8.1") + id("com.gradle.enterprise").version("3.15.1") id("de.fayard.refreshVersions") } diff --git a/sample-kotlin/versions.properties b/sample-kotlin/versions.properties index bbc0097e3..58a628384 100644 --- a/sample-kotlin/versions.properties +++ b/sample-kotlin/versions.properties @@ -1,6 +1,6 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.52.0-SNAPSHOT -#### Revision of dependency notations removals: 15 +#### Generated by `./gradlew refreshVersions` version 0.60.4-SNAPSHOT +#### Revision of dependency notations removals: 19 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. @@ -11,6 +11,13 @@ #### NOTE: Some versions are filtered by the rejectVersionIf predicate. See the settings.gradle.kts file. plugin.org.jetbrains.kotlinx.benchmark=0.4.2 +## # available=0.4.3 +## # available=0.4.4 +## # available=0.4.5 +## # available=0.4.6 +## # available=0.4.7 +## # available=0.4.8 +## # available=0.4.9 ## unused plugin.com.example.unused=42 @@ -18,16 +25,22 @@ plugin.com.example.unused=42 ## unused version.com.example..dummy-library-for-testing=0.1.0-alpha01 +## unused version.org.apache.logging.log4j..log4j-bom=2.17.2 +## unused version.org.mongodb..mongo-java-driver=3.11.0 +## unused version.okhttp3=3.10.0 +## unused version.junit.junit=4.12 +## unused version.com.google.inject..guice=2.0 +## unused version.com.google.guava..guava=15.0 ## unused @@ -40,14 +53,84 @@ version.androidx.browser=1.0.0 version.androidx.cardview=1.0.0 version.androidx.core=1.3.1 +## # available=1.3.2 +## # available=1.5.0 +## # available=1.6.0 +## # available=1.7.0 +## # available=1.8.0 +## # available=1.9.0 +## # available=1.10.0 +## # available=1.10.1 +## # available=1.12.0 version.apache.poi=4.0.0 +## # available=4.0.1 +## # available=4.1.0 +## # available=4.1.1 +## # available=4.1.2 +## # available=5.0.0 +## # available=5.1.0 +## # available=5.2.0 +## # available=5.2.1 +## # available=5.2.2 +## # available=5.2.3 +## # available=5.2.4 version.kotest=5.1.0 +## # available=5.2.0 +## # available=5.2.1 +## # available=5.2.2 +## # available=5.2.3 +## # available=5.3.0 +## # available=5.3.1 +## # available=5.3.2 +## # available=5.4.0 +## # available=5.4.1 +## # available=5.4.2 +## # available=5.5.0 +## # available=5.5.1 +## # available=5.5.2 +## # available=5.5.3 +## # available=5.5.4 +## # available=5.5.5 +## # available=5.6.0 +## # available=5.6.1 +## # available=5.6.2 +## # available=5.7.0 +## # available=5.7.1 +## # available=5.7.2 +## # available=5.8.0 version.kotlin=1.6.10 +## # available=1.6.20 +## # available=1.6.21 +## # available=1.7.0 +## # available=1.7.10 +## # available=1.7.20 +## # available=1.7.21 +## # available=1.7.22 +## # available=1.8.0 +## # available=1.8.0-343 +## # available=1.8.10 +## # available=1.8.20 +## # available=1.8.21 +## # available=1.8.22 +## # available=1.9.0 +## # available=1.9.10 +## # available=1.9.20 version.kotlinx.coroutines=1.6.0 +## # available=1.6.0-native-mt +## # available=1.6.1 +## # available=1.6.1-native-mt +## # available=1.6.2 +## # available=1.6.3 +## # available=1.6.3-native-mt +## # available=1.6.4 +## # available=1.7.0 +## # available=1.7.1 +## # available=1.7.2 +## # available=1.7.3 ## unused version.org.apache.poi..poi=4.1.2 @@ -56,3 +139,4 @@ version.org.apache.poi..poi=4.1.2 version.org.apache.poi..poi-ooxml=4.1.2 version.org.gradle..gradle-hello-world-plugin=0.1 +## # available=0.2 diff --git a/sample-multi-modules/build.gradle.kts b/sample-multi-modules/build.gradle.kts index e69de29bb..7ef614c0a 100644 --- a/sample-multi-modules/build.gradle.kts +++ b/sample-multi-modules/build.gradle.kts @@ -0,0 +1,3 @@ +plugins { + kotlin("jvm") apply false +} diff --git a/sample-multi-modules/gradle/wrapper/gradle-wrapper.jar b/sample-multi-modules/gradle/wrapper/gradle-wrapper.jar index 41d9927a4..7f93135c4 100644 Binary files a/sample-multi-modules/gradle/wrapper/gradle-wrapper.jar and b/sample-multi-modules/gradle/wrapper/gradle-wrapper.jar differ diff --git a/sample-multi-modules/gradle/wrapper/gradle-wrapper.properties b/sample-multi-modules/gradle/wrapper/gradle-wrapper.properties index aa991fcea..1af9e0930 100644 --- a/sample-multi-modules/gradle/wrapper/gradle-wrapper.properties +++ b/sample-multi-modules/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample-multi-modules/gradlew b/sample-multi-modules/gradlew index 1b6c78733..1aa94a426 100755 --- a/sample-multi-modules/gradlew +++ b/sample-multi-modules/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# 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 # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +214,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/sample-multi-modules/gradlew.bat b/sample-multi-modules/gradlew.bat index 107acd32c..93e3f59f1 100644 --- a/sample-multi-modules/gradlew.bat +++ b/sample-multi-modules/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/sample-multi-modules/module2/build.gradle.kts b/sample-multi-modules/module2/build.gradle.kts index 7d4ea688b..0c52c7d7f 100644 --- a/sample-multi-modules/module2/build.gradle.kts +++ b/sample-multi-modules/module2/build.gradle.kts @@ -27,7 +27,6 @@ dependencies { implementation(Libs.clikt) implementation(Ktor.client.auth) - implementation(Ktor.client.authBasic) implementation(Ktor.client.core) implementation(Ktor.client.cio) implementation(Ktor.client.json) @@ -35,12 +34,12 @@ dependencies { implementation(Ktor.client.serialization) implementation(Ktor.client.logging) implementation(Ktor.client.encoding) - implementation(Ktor.client.websockets) - implementation(Ktor.http) - implementation(Ktor.features.htmlBuilder) - implementation(Ktor.features.auth) - implementation(Ktor.network.network) - implementation(Ktor.network.tls) + implementation(Ktor.server.websockets) + implementation(Ktor.plugins.http) + implementation(Ktor.server.htmlBuilder) + implementation(Ktor.server.auth) + implementation(Ktor.plugins.network) + implementation(Ktor.plugins.networkTls) implementation(Ktor.server.core) implementation(Ktor.utils) @@ -50,13 +49,12 @@ dependencies { testImplementation(Testing.junit.jupiter.params) testImplementation(Testing.kotest.assertions.core) testImplementation(Testing.kotest.assertions.json) - testImplementation(Testing.kotest.assertions.jsoup) +// testImplementation(Testing.kotest.assertions.jsoup) testImplementation(Testing.kotest.assertions.sql) - testImplementation(Testing.kotest.core) - testImplementation(Testing.kotest.extensions.http) +// testImplementation(Testing.kotest.core) testImplementation(Testing.kotest.extensions.koin) testImplementation(Testing.kotest.extensions.mockServer) - testImplementation(Testing.kotest.plugins.piTest) +// testImplementation(Testing.kotest.plugins.piTest) testImplementation(Testing.kotest.property) testImplementation(Testing.kotest.runner.junit4) testImplementation(Testing.mockK.common) diff --git a/sample-multi-modules/settings.gradle.kts b/sample-multi-modules/settings.gradle.kts index 3f1fa7086..98d1126a0 100644 --- a/sample-multi-modules/settings.gradle.kts +++ b/sample-multi-modules/settings.gradle.kts @@ -15,13 +15,7 @@ pluginManagement { } plugins { - id("com.gradle.enterprise").version("3.8") -//// # available:"3.8.1") -//// # available:"3.9") -//// # available:"3.10") -//// # available:"3.10.1") -//// # available:"3.10.2") -//// # available:"3.10.3") + id("com.gradle.enterprise").version("3.15.1") id("de.fayard.refreshVersions") } diff --git a/sample-multi-modules/versions.properties b/sample-multi-modules/versions.properties index f3a637480..4c78f9932 100644 --- a/sample-multi-modules/versions.properties +++ b/sample-multi-modules/versions.properties @@ -1,6 +1,6 @@ #### Dependencies and Plugin versions with their available updates. -#### Generated by `./gradlew refreshVersions` version 0.41.0-SNAPSHOT -#### Revision of dependency notations removals: 11 +#### Generated by `./gradlew refreshVersions` version 0.60.4-SNAPSHOT +#### Revision of dependency notations removals: 19 #### #### Don't manually edit or split the comments that start with four hashtags (####), #### they will be overwritten by refreshVersions. @@ -25,6 +25,10 @@ version.junit.jupiter=5.7.1 version.kotest=5.1.0 +version.kotest.extensions.koin=1.3.0 + +version.kotest.extensions.mockserver=1.3.0 + version.kotlin=1.6.10 @@ -32,7 +36,8 @@ version.kotlinx.collections.immutable=0.3.2 version.kotlinx.coroutines=1.6.0 - version.ktor=1.3.2-1.4-M1 + version.ktor=2.3.6 + version.mockito=3.9.0