Gradle buildSrcVersions v0.10.0 Release Notes

Release Date: 2021-05-13 // almost 3 years ago
  • πŸ†• New features

    • πŸ’» There's a new versionFor function that takes a dependency notation, or a version key, and returns the corresponding version that is in the versions.properties file. For example, if you use Jetpack Compose, you can leverage it to set kotlinCompilerExtensionVersion with versionFor(AndroidX.compose.ui). Groovy DSL users can find it in the Versions class.
    • πŸ‘Œ Support updates of settings plugins in settings.gradle.kts and settings.gradle files (including refreshVersions itself).
    • πŸ‘Œ Support getting versions from Google Cloud Storage backed repositories. This can be helpful if you need to update private artifacts hosted there. Thanks to NikkyAI for the contribution!

    πŸ”„ Changes

    • πŸ— Setting up refreshVersions has been significantly simplified: Now, it's simply a plugin that must be applied in the settings.gradle.kts or settings.gradle file. Note that if you want to apply it to buildSrc as well, there's a gotcha regarding defining the version. The best thing is that on upgrade, refreshVersions will automatically replace the old & verbose bootstrap with the new plugin setup, and that works for buildSrc special case as well. We made many tests to ensure that this logic is reliable, doesn't break any code, doesn't remove important comments, and doesn't affect custom configuration in any way.
    • 🚚 Bintray sunset resiliency: If refreshVersions encounters an HTTP 403 response on a bintray repository or on jcenter, it will consider the artifact to not be in this repository instead of crashing (but you can/should still remove bintray repo declarations anyway since it has been sunset).
    • βœ… Missing short version key rules have been added for many dependency notations groups in the Testing object, and for Orchid.

    Potentially breaking changes

    • ⬆️ The fix of the Square.sqlDelight.coroutinesExtensions dependency notation can lead to such an error: Failed to resolve: coroutines-extensions-1.4.4-_. If you get a similar error on upgrade, it's because you applied a fix like that one: Square.sqlDelight.coroutinesExtensions + ":_". You now can (must) remove it.
    • ⬆️ A bunch of new version key rules have been added, which means you might have changes of version keys, and because we currently don't have a migration facility for those, it might cause unwanted upgrades. Consequently, especially for Android projects, we recommend checking/verifying the changes made by refreshVersions after the first Gradle sync/reload/build that follows the upgrade.

    πŸ›  Fixes

    • Authentication for maven repositories should now work correctly. Should, because it can only work using internal Gradle APIs for the time being (though there's a safeguard to not crash if the API changes). Thanks to Mayank Kharbanda for the PR!
    • πŸ›  Custom extraArtifactVersionKeyRules could not be taken into account if there was an overlapping rule already present in refreshVersions, even if it was more specific. That ordering issue has now been fixed, the most specific rule will now always be the one applied.
    • βœ… If you had issues with some recent AndroidX artifacts, and their version key, they should all be fixed now, and there's all the latest dependency notations.

    πŸ†• New dependency notations

    • AndroidX:
      • activity.ktx
      • activity.compose
      • appSearch
      • appSearch.compiler
      • appSearch.localStorage
      • biometricKtx
      • carApp
      • carApp.testing
      • compose:
        • material.ripple
        • runtime.rxJava3
        • runtime.saveable
        • ui:
          • test
          • testJunit4
          • testManifest
          • tooling
          • toolingData
          • viewBinding
      • constraintLayoutCompose
      • core.googleShortcuts
      • dataStore:
        • core
        • rxJava2
        • rxJava3
        • preferences:
          • core
          • rxJava2
          • rxJava3
      • hilt.navigationCompose
      • hilt.navigationFragment
      • leanback.paging
      • leanback.preference
      • leanback.tab
      • lifecycle.viewModelCompose
      • navigation.compose
      • navigation.dynamicFeaturesFragment
      • paging.compose
      • paging.rxJava3
      • savedStateKtx
      • security.appAuthenticator
      • transitionKtx
      • wear:
        • complications.data
        • complications.provider
        • input
        • inputTesting
        • ongoing
        • phoneInteractions
        • remoteInteractions
        • watchFace
        • watchFace.guava
        • watchFace.client
        • watchFace.clientGuava
        • watchFace.complicationsRendering
        • watchFace.data
        • watchFace.editor
        • watchFace.editorGuava
        • watchFace.style
        • tiles:
          • proto
          • renderer
      • work.multiprocess
      • work.rxJava3
    • Firebase:
      • analyticsKtx
      • authenticationKtx
      • cloudMessagingKtx
      • crashlyticsKtx
      • dynamicLinksKtx
      • performanceMonitoringKtx
    • Google:
      • accompanist:
        • appcompatTheme
        • coil
        • flowlayout
        • glide
        • imageloadingCore
        • insets
        • pager.indicators
        • pager
        • swiperefresh
        • systemuicontroller
      • android.material.composeThemeAdapter
      • dagger.hilt.compiler
    • βœ… Testing.kotest.assertions.kotlinxDateTime

    Special mentions

    Thanks to all the folks that joined Louis CAD in pair-programming sessions:

    πŸš‘ These were critical to ensure thorough testing, and great quality, all while keeping motivation to keep going.

    We're very grateful for your time and help, and we think our users will be as well. πŸ™

    Also, thanks to all the folks that reported issues. It was very helpful to prioritize on our side.