Skip to content

v0.18

Compare
Choose a tag to compare
@osipxd osipxd released this 07 Mar 10:22
· 55 commits to main since this release
20252f5

Kotlin Gradle Plugin and Android Gradle Plugin removed from transitive dependencies

⚠️ BREAKING CHANGE!

It should be simple to change KGP and APG versions, no matter what versions were used on gradle-infrastructure compilation. Previously it was hard to update gradle-infrastructure without updating AGP and KGP, and also it was hard to downgrade AGP or KGP if it was needed.

Since now, KGP and AGP removed from transitive dependencies, and you should add it to your project manually. You can use two different approaches to do it:

  1. Add AGP and KGP to top-level build.gradle.kts with apply false

    // (root)/build.gradle.kts
    
    plugins {
        // Use `apply false` in the top-level build.gradle file to add a Gradle 
        // plugin as a build dependency but not apply it to the current (root) project.
        // Here you can specify desired AGP and KGP versions to use.
        id("com.android.application") version "7.4.2" apply false
        id("org.jetbrains.kotlin.android") version "1.8.10" apply false
    }
  2. If you have buildSrc or some other module containing build logic, you can add AGP and KGP to dependencies of this module:

    // (root)/buildSrc/build.gradle.kts
    
    dependencies {
        // Here you can specify desired AGP and KGP versions to use.
        implementation(kotlin("gradle-plugin", version = "1.8.10"))
        implementation("com.android.tools.build:gradle:7.4.2")
    }

Minimal required AGP and KGP will always be specified in README.

BREAKING CHANGES

  • android: Fixed obfuscation on QA builds with AGP 7.2+ (#120)
  • android: Default targetSdk changed from 32 to 33
  • android: Don't set targetSdk in library modules. This field is deprecated and doesn't take any effect since AGP 7.4 (b/230625468)
  • android: Removed default resourceConfigurations. Use resourceConfigurations.add("ru") if you want to keep old behavior (#115)
  • Change default target JVM from 1.8 to 11 (property redmadrobot.jvmTarget)

Other changes

  • android: Removed workaround for b/215407138 that is fixed in AGP 7.4
  • publish: More detailed description for the case when plugin cannot recognize project type (#116)
  • Update Gradle to 8.0.2

Dependencies

infrastructure-kotlin:

infrastructure-android:

infrastructure-detekt:

Full Changelog: v0.17...v0.18