From 6342d8436d79e180b4e64d591cf392f6d349694d Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Tue, 29 Aug 2023 18:02:26 +0200 Subject: [PATCH 1/8] Prepare next development version. --- plugins/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/version.txt b/plugins/version.txt index 53c9cab19..bf394a482 100644 --- a/plugins/version.txt +++ b/plugins/version.txt @@ -1 +1 @@ -0.60.2 \ No newline at end of file +0.60.3-SNAPSHOT \ No newline at end of file From 5a11939e109dd6017f77071662d6eaa5ed895b79 Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 17:45:35 +0200 Subject: [PATCH 2/8] Record dependencies in afterEvaluate This avoids the code from running too early, before dependencies are set. This doesn't happen in all projects, and, so far, it's unclear why dependencies are set in the allProjects callback in some projects, but not in some others. --- .../core/internal/dependencies/DependenciesTracker.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt index 10f794513..13246f49c 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt @@ -34,7 +34,11 @@ internal class DependenciesTracker { // See https://kotlinlang.org/docs/js-project-setup.html#additional-yarn-features-yarnrc // and https://yarnpkg.com/getting-started/migration#update-your-configuration-to-the-new-settings // and also https://yarnpkg.com/configuration/yarnrc#npmRegistryServer - rootProject.allprojects { recordBuildscriptAndRegularDependencies(npmRegistries) } + rootProject.allprojects { + afterEvaluate { + recordBuildscriptAndRegularDependencies(npmRegistries) + } + } } private fun Project.recordBuildscriptAndRegularDependencies(npmRegistries: List) { From c4d0a9cb571d43d48c216637ebe425bf1e46d5fa Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:02:39 +0200 Subject: [PATCH 3/8] Don't log "0 more" when there are 1 to 3 possibly hardcoded dependency versions --- .../de/fayard/refreshVersions/core/RefreshVersionsTask.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 eedf269b5..4a965e178 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 @@ -199,7 +199,8 @@ open class RefreshVersionsTask : DefaultTask() { logger.warn("Found ${dependenciesWithHardcodedVersions.count()} dependencies that might have hardcoded versions:") warnFor.forEach { logger.warn("- $it") } if (logger.isInfoEnabled.not()) { - logger.warn("- ${dependenciesWithHardcodedVersions.size - warnFor.size} more... (run with --info to see them all)") + val howManyMore = dependenciesWithHardcodedVersions.size - warnFor.size + if (howManyMore > 0) logger.warn("- $howManyMore more... (run with --info to see them all)") } logger.warn("") logger.warn( From 132ca51e22d2d613e847e6d8d13844a514d198ab Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:05:14 +0200 Subject: [PATCH 4/8] Update update date in AndroidX.kt --- plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt b/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt index f73a5b385..d41e563ad 100644 --- a/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt +++ b/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt @@ -16,7 +16,7 @@ import org.gradle.kotlin.dsl.IsNotADependency * - Back in 2019 November the 18th, AndroidX was made of **187 artifacts**. */ object AndroidX : IsNotADependency { - // Last AndroidX Update sync: Jul 26, 2023. + // Last AndroidX Update sync: Aug 23, 2023. // See https://androidx.tech/blog/updates for easier updates tracking // LibraryGroups.kt: https://github.com/androidx/androidx/blob/androidx-main/buildSrc/public/src/main/kotlin/androidx/build/LibraryGroups.kt // LibraryVersions.kt: https://github.com/androidx/androidx/blob/androidx-main/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt From 83f26710a3250db2b83c2770bfec19eac072f13b Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:27:28 +0200 Subject: [PATCH 5/8] Add new AndroidX.bluetooth dependency notations --- .../src/main/kotlin/dependencies/AndroidX.kt | 20 ++++++++++++++++++- .../bundled-dependencies-validated.txt | 2 ++ .../dependencies-mapping-validated.txt | 2 ++ .../dependencies-versions-key-validated.txt | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt b/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt index d41e563ad..0294c1a39 100644 --- a/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt +++ b/plugins/dependencies/src/main/kotlin/dependencies/AndroidX.kt @@ -16,7 +16,7 @@ import org.gradle.kotlin.dsl.IsNotADependency * - Back in 2019 November the 18th, AndroidX was made of **187 artifacts**. */ object AndroidX : IsNotADependency { - // Last AndroidX Update sync: Aug 23, 2023. + // Last AndroidX Update sync: Sep 20, 2023. // See https://androidx.tech/blog/updates for easier updates tracking // LibraryGroups.kt: https://github.com/androidx/androidx/blob/androidx-main/buildSrc/public/src/main/kotlin/androidx/build/LibraryGroups.kt // LibraryVersions.kt: https://github.com/androidx/androidx/blob/androidx-main/buildSrc/public/src/main/kotlin/androidx/build/LibraryVersions.kt @@ -314,6 +314,24 @@ object AndroidX : IsNotADependency { val ktx = module("biometric-ktx") } + /** + * AndroidX Bluetooth Library. + * + * [Release notes](https://developer.android.com/jetpack/androidx/releases/bluetooth) + * + * ### API reference: + * - [androidx.bluetooth](https://developer.android.com/reference/kotlin/androidx/bluetooth/package-summary) + */ + val bluetooth = Bluetooth + + object Bluetooth : DependencyNotationAndGroup( + group = "androidx.bluetooth", + name = "bluetooth" + ) { + /** Test utilities for AndroidX Bluetooth */ + val testing = module("bluetooth-testing") + } + /** * Android Support Custom Tabs. * diff --git a/plugins/dependencies/src/test/resources/bundled-dependencies-validated.txt b/plugins/dependencies/src/test/resources/bundled-dependencies-validated.txt index 40b8b4431..ee3d3f2e6 100644 --- a/plugins/dependencies/src/test/resources/bundled-dependencies-validated.txt +++ b/plugins/dependencies/src/test/resources/bundled-dependencies-validated.txt @@ -28,6 +28,8 @@ androidx.benchmark:benchmark-macro androidx.benchmark:benchmark-macro-junit4 androidx.biometric:biometric androidx.biometric:biometric-ktx +androidx.bluetooth:bluetooth +androidx.bluetooth:bluetooth-testing androidx.browser:browser androidx.camera:camera-camera2 androidx.camera:camera-core diff --git a/plugins/dependencies/src/test/resources/dependencies-mapping-validated.txt b/plugins/dependencies/src/test/resources/dependencies-mapping-validated.txt index fc886383e..3b355f588 100644 --- a/plugins/dependencies/src/test/resources/dependencies-mapping-validated.txt +++ b/plugins/dependencies/src/test/resources/dependencies-mapping-validated.txt @@ -29,6 +29,8 @@ androidx.benchmark..benchmark-macro-junit4=AndroidX.benchmark.macroJunit4 androidx.benchmark..benchmark-macro=AndroidX.benchmark.macro androidx.biometric..biometric-ktx=AndroidX.biometric.ktx androidx.biometric..biometric=AndroidX.biometric +androidx.bluetooth..bluetooth-testing=AndroidX.bluetooth.testing +androidx.bluetooth..bluetooth=AndroidX.bluetooth androidx.browser..browser=AndroidX.browser androidx.camera..camera-camera2=AndroidX.camera.camera2 androidx.camera..camera-core=AndroidX.camera.core 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 6df67e29d..6d9993f4b 100644 --- a/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt +++ b/plugins/dependencies/src/test/resources/dependencies-versions-key-validated.txt @@ -28,6 +28,8 @@ androidx.benchmark..benchmark-macro-junit4=version.androidx.benchmark androidx.benchmark..benchmark-macro=version.androidx.benchmark androidx.biometric..biometric-ktx=version.androidx.biometric-ktx androidx.biometric..biometric=version.androidx.biometric +androidx.bluetooth..bluetooth-testing=version.androidx.bluetooth +androidx.bluetooth..bluetooth=version.androidx.bluetooth androidx.browser..browser=version.androidx.browser androidx.camera..camera-camera2=version.androidx.camera androidx.camera..camera-core=version.androidx.camera From d158c0b36b6509d59e683f8050d3b33499ee7209 Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:29:49 +0200 Subject: [PATCH 6/8] Update CHANGELOG.md --- CHANGELOG.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59016d2ba..c60377686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change log for refreshVersions +## [Unreleased] Version 0.60.3 (2023-09-27) + +### Bug fix + +Fix a bug where version keys would be marked as unused in some projects. + +### New dependency notations + +
+Click to expand (18) + +- `AndroidX.bluetooth` +- `AndroidX.bluetooth.testing` +
+ + ## Version 0.60.2 (2023-08-29) ### Bug fix From 9342a312d79e6ee9bbca87884c54f9ae992be9b0 Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:37:07 +0200 Subject: [PATCH 7/8] Prepare for release 0.60.3 --- CHANGELOG.md | 2 +- README.md | 2 +- docs/dependency-notations.md | 17 ++++++++++++++++- mkdocs.yml | 6 +++--- .../version-to-removals-revision-mapping.txt | 1 + plugins/version.txt | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c60377686..6c443079d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change log for refreshVersions -## [Unreleased] Version 0.60.3 (2023-09-27) +## Version 0.60.3 (2023-09-27) ### Bug fix diff --git a/README.md b/README.md index d5e27d6ff..183d697f0 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.2" + id("de.fayard.refreshVersions") version "0.60.3" } refreshVersions { // Optional: configure the plugin diff --git a/docs/dependency-notations.md b/docs/dependency-notations.md index 0c32a3f72..8474b55e8 100644 --- a/docs/dependency-notations.md +++ b/docs/dependency-notations.md @@ -3,7 +3,7 @@ title: Built-in Dependency Notations --- # Built-in Dependency Notations -[**refreshVersions**](https://github.com/Splitties/refreshVersions) provides **1254** Dependency Notations in **26** groups and **263** subgroups +[**refreshVersions**](https://github.com/Splitties/refreshVersions) provides **1256** Dependency Notations in **26** groups and **264** subgroups **Built-in Dependency Notations** are maven coordinates of popular libraries, discoverable as for example `KotlinX.coroutines.core` in IntelliJ IDEA, @@ -126,6 +126,12 @@ Hover 🐁 on a dependency notation to see its `Triple(KotlinName, MavenCoordina biometric - + + bluetooth + + - @@ -602,6 +608,15 @@ Hover 🐁 on a dependency notation to see its `Triple(KotlinName, MavenCoordina + AndroidX.bluetooth + + testing + + + + AndroidX.camera ctrl/cmd + shift + A 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 c15ee8071..a9691f066 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 @@ -12,3 +12,4 @@ 0.60.0->16 0.60.1->17 0.60.2->19 +0.60.3->19 diff --git a/plugins/version.txt b/plugins/version.txt index bf394a482..365525dbe 100644 --- a/plugins/version.txt +++ b/plugins/version.txt @@ -1 +1 @@ -0.60.3-SNAPSHOT \ No newline at end of file +0.60.3 \ No newline at end of file From ac75e676e6ca11323ce47c0b5dbe9d592c03ccbb Mon Sep 17 00:00:00 2001 From: Louis CAD Date: Wed, 27 Sep 2023 18:58:41 +0200 Subject: [PATCH 8/8] Workaround Gradle exception when the project was apparently already evaluated --- .../core/internal/dependencies/DependenciesTracker.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt index 13246f49c..9ebf85e2f 100644 --- a/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt +++ b/plugins/core/src/main/kotlin/de/fayard/refreshVersions/core/internal/dependencies/DependenciesTracker.kt @@ -10,6 +10,7 @@ import de.fayard.refreshVersions.core.internal.forNpm import de.fayard.refreshVersions.core.internal.withGlobalRepos import de.fayard.refreshVersions.core.internal.withPluginsRepos import okhttp3.OkHttpClient +import org.gradle.api.InvalidUserCodeException import org.gradle.api.Project import org.gradle.api.artifacts.ConfigurationContainer import org.gradle.api.artifacts.Dependency @@ -35,7 +36,11 @@ internal class DependenciesTracker { // and https://yarnpkg.com/getting-started/migration#update-your-configuration-to-the-new-settings // and also https://yarnpkg.com/configuration/yarnrc#npmRegistryServer rootProject.allprojects { - afterEvaluate { + try { + afterEvaluate { + recordBuildscriptAndRegularDependencies(npmRegistries) + } + } catch (e: InvalidUserCodeException) { recordBuildscriptAndRegularDependencies(npmRegistries) } }