Skip to content

Releases: RedMadRobot/gradle-infrastructure

v0.18.1

18 Apr 04:29
fb93711
Compare
Choose a tag to compare
  • Fix compatibility with Gradle lower than 8.0 (#127)
  • Update Gradle to 8.1

Full Changelog: v0.18...v0.18.1

v0.18

07 Mar 10:22
20252f5
Compare
Choose a tag to compare

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

v0.17

29 Jul 19:21
2837c07
Compare
Choose a tag to compare

Be careful if you use detekt with type resolution!
This version updates Kotlin to 1.7.10, which is not supported by type resolution mode in detekt.
Detekt will support Kotlin 1.7.10 in 1.22.0

Changed

  • android: Default minSdk changed from 21 to 23 (POTENTIALLY BREAKING CHANGE)
  • android: Change target JDK for plugins from 8 to 11
  • Update Gradle to 7.5

Fixed

  • Make flag redmadrobot.add.repositories work also for com.redmadrobot.detekt plugin (#104)

Dependencies

Full Changelog: v0.16.2...v0.17

infrastructure 0.16.2

17 Jun 11:21
5ff9de9
Compare
Choose a tag to compare

Fixed

  • Defaults from parent project are not applied to project (#107)

Full Changelog: v0.16.1...v0.16.2

infrastructure 0.16.1

17 Jun 07:20
b06f08e
Compare
Choose a tag to compare

Added

  • Ability to disable automatic repositories adding using project property redmadrobot.add.repositories (#104)

Fixed

  • Extension test will no longer expose internal type TestOptionsImpl (#105)

Full Changelog: v0.16...v0.16.1

infrastructure 0.16

25 Apr 08:02
f3d1f70
Compare
Choose a tag to compare

Added

  • publish: Check if a publication can be configured automatically for the project
  • android: Add files from proguard/ directory to consumerProguardFiles in android-library modules (#101)

Changed

  • android: Default target API changed to 32
  • android: Lint results location now configured only for application modules.
    Lint running will no longer conflict in android-library modules (#102)
  • publish: Migrate android-library publication to the new publishing API introduced in AGP 7.1
  • Revert change from 0.15 when isRunningOnCi were made extension on Project

Housekeeping

  • Added @InternalGradleInfrastructureApi annotation to all API that not intended for public use
  • Added missing KDocs for all public classes

Dependencies

Full Changelog: v0.15...v0.16

infrastructure 0.15

20 Jan 16:01
25b4bee
Compare
Choose a tag to compare

Added

  • Shortcuts for easy access to QA build type:
    android {
        buildTypes {
            qa {
                // ...
            }
        }
    }
  • Apply Lint settings to android-library modules (#98)
  • Configuration caching support (experimental)
  • Version catalogs publication via com.redmadrobot.publish (#100)

Changed

  • Breaking change: property isRunningOnCi changed to an extension-property on Project for configuration caching support
  • Switch to experimental API added in AGP 7.0.0
  • Changed QA build type fallbacks from [release] to [debug, release]

Fixed

  • Fixed error when trying to override jvmTarget or android options in subprojects
  • Use jvmTarget for java target and source compatibility (#93)

Dependencies

  • Android Gradle Plugin 7.0.3 -> 7.0.4
  • Android cache fix Gradle plugin 2.4.5 -> 2.4.6

Full Changelog: v0.14...v0.15

infrastructure 0.14

10 Jan 06:48
f9fb3d2
Compare
Choose a tag to compare

Dependencies

  • Android Gradle Plugin 4.2.2 -> 7.0.3
  • Android cache fix Gradle plugin 2.4.3 -> 2.4.5
  • Kotlin 1.5.31 -> 1.6.10
  • JGit 5.12.0 -> 6.0.0

Added

  • Added workaround for the case when detekt ignores kotlin sources when run on Android project with type resolution (detekt/detekt#4177)

infrastructure 0.13

14 Dec 12:45
fbbcc59
Compare
Choose a tag to compare

Change plugins naming convention

Breaking change!

Plugins group changed from redmadrobot to com.redmadrobot.
This change allows us to publish infrastructure plugins to Gradle Plugins Portal and make it easier to add plugins to project.

Changing resolutionStrategy in settings.gradle.kts is not needed anymore.
To make migration easier, it is allowed to apply plugins with deprecated IDs if you've specified resolutionStrategy, but it will throw a warning to console.

Switch to multi-modular structure

Breaking change!

Why multi-modular structure?

Until now plugins' structure inside module infrastructure was looking like this:

Plugin root-project was used to add configurations for all others plugins.
With such structure all plugins should know about root-project plugin to access configs, and root-project should also know about all plugins to hold their configs.
It is possible only if all plugins are declared in the same module with root-project.
So it was the main stopping factor from breaking infrastructure to several independent modules.

Multi-modular structure gives important benefits to us:

  • Allows modules to be updated independently, allowing users to pick what version of each module they want to use.
  • Makes infrastructure more scalable.
    Because it is not more required to change root-project when adding a new plugin.
  • Enables to use only "what you want" and don't bring extra dependencies to project.

Since now plugins are separated to modules:

Plugin root-project is deprecated now and will be removed in further versions.
Extensions are added to project via *-config plugins (exception is detekt plugin, so it is designed to be applied to root project).

If you want to get the same behavior as applying root-project, you can apply all config plugins to the root project:

apply {
    id("com.redmadrobot.android-config") version "0.13"
    id("com.redmadrobot.publish-config") version "0.13"
    id("com.redmadrobot.detekt") version "0.13"
}

Configs behavior changes

  • *-config plugins can be applied to any project.
    Config from inner project will inherit options from outer project.
  • Options redmadrobot.android.test are inherited from redmadrobot.test

Dependencies

  • Kotlin 1.5.30 -> 1.5.31
  • Detekt 1.18.1 -> 1.19.0

Added

  • Added repository extension jitpack() (#82)

Changed

  • Breaking change! Repositories ossrh and ossrhSnapshots now use host s01.oss.sonatype.org by default.
    To keep legacy host oss.sonatype.org, use ossrh(LEGACY) instead.
  • Breaking change! Directory with ProGuard rules now intended to be in application project instead of root project.
  • Default targetSdk changed from 30 to 31.
  • Gradle updated to 7.3.1

Fixed

  • Non-Kotlin modules are excluded from checking that the module contains detekt #81

infrastructure 0.12.2

15 Nov 14:36
91a39f9
Compare
Choose a tag to compare

Fixed

  • Fixed proguard file detection which was broken after file extensions check was added by @osipxd in #84

Full Changelog: v0.12.1...v0.12.2