Releases: RedMadRobot/gradle-infrastructure
v0.18.1
v0.18
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:
-
Add AGP and KGP to top-level
build.gradle.kts
withapply 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 }
-
If you have
buildSrc
or some other module containing build logic, you can add AGP and KGP todependencies
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 from32
to33
- 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
. UseresourceConfigurations.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:
- Kotlin
1.7.10
→1.8.10
infrastructure-android:
- Android Gradle Plugin
7.2.1
→7.4.2
(:warning: Minimal required AGP version is7.4.0
) - Android cache fix Gradle plugin
2.5.6
→2.7.0
infrastructure-detekt:
Full Changelog: v0.17...v0.18
v0.17
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 from21
to23
(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 forcom.redmadrobot.detekt
plugin (#104)
Dependencies
- Kotlin Gradle Plugin
1.6.10
→1.7.10
- Android Gradle Plugin
7.1.3
->7.2.1
- Android cache fix Gradle plugin
2.5.1
→2.5.6
- Detekt
1.20.0
→1.21.0
- JGit
6.1.0
→6.2.0
Full Changelog: v0.16.2...v0.17
infrastructure 0.16.2
Fixed
- Defaults from parent project are not applied to project (#107)
Full Changelog: v0.16.1...v0.16.2
infrastructure 0.16.1
Added
- Ability to disable automatic repositories adding using project property
redmadrobot.add.repositories
(#104)
Fixed
- Extension
test
will no longer expose internal typeTestOptionsImpl
(#105)
Full Changelog: v0.16...v0.16.1
infrastructure 0.16
Added
- publish: Check if a publication can be configured automatically for the project
- android: Add files from
proguard/
directory toconsumerProguardFiles
inandroid-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 inandroid-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 onProject
Housekeeping
- Added
@InternalGradleInfrastructureApi
annotation to all API that not intended for public use - Added missing KDocs for all public classes
Dependencies
- Android Gradle Plugin
7.0.4
→7.1.3
- Android cache fix Gradle plugin
2.4.6
→2.5.1
- detekt
1.19.0
→1.20.0
- plugin-publish-plugin
0.19.0
→0.21.0
- JGit
6.0.0
→6.1.0
Full Changelog: v0.15...v0.16
infrastructure 0.15
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 onProject
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
orandroid
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
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
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 changeroot-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 fromredmadrobot.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
andossrhSnapshots
now use hosts01.oss.sonatype.org
by default.
To keep legacy hostoss.sonatype.org
, useossrh(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
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