Skip to content

v0.19

Compare
Choose a tag to compare
@github-actions github-actions released this 26 Jul 09:12
· 7 commits to main since this release
e39f2f1

Note

This release removes many implicit features that couldn't be configured from outside.
It is also a part of a process of removing the features that could be easily implemented via pre-compiled script plugins (for example, SDK versions and tests configuration).
It is recommended to migrate these configurations to pre-compiled script plugins.

Stable addSharedSourceSetRoot extension

Experimental extension addSharedSourceSetRoot(...) has been replaced with the new stable version:

android {
    // The old way (Deprecated)
    addSharedSourceSetRoot("debug", "qa")
    
    // The new way
    sourceSets.addSharedSourceSetRoot("debug", "qa")
}

Introduce SigningConfig.fromProperties (Experimental)

It is common practice to store keystore credentials in .properties file.
This extension lets you apply configurations from a property file.

android {
    signingConfigs.getByName<SigningConfig>("debug") {
        fromProperties(file("cert/debug.properties"))
    }
}

⚠️ BREAKING CHANGES

  • common: Deprecate redmadrobot.jvmTarget with deprecation level Error.
    Use JVM Toolchains instead to specify JVM target.
    Kotlin, Android Gradle Plugin, detekt and many other tools have support for this mechanism,
    In most cases, adding this into your build.gradle.kts should be enough:
    kotlin {
        jvmToolchain(17)
    }
    You can also configure automatic toolchains downloading.
  • android: Don't set default minSdk (it was 23) and targetSdk (it was 33).
    It was a poor decision to set defaults for these fields as could implicitly bump an SDK version in a project.
    If you want to use redmadrobot.android to align SDK versions among all modules, you should set these properties explicitly:
    redmadrobot {
        android {
            minSdk = 23
            targetSdk = 34
        }
    }
  • common: Disable automatic repositories adding by default.
    If you rely on this feature, consider declaring required repositories explicitly, or enable it in gradle.properties:
    redmadrobot.add.repositories=true
  • android: Don't apply org.gradle.android.cache-fix plugin automatically.
    This change allows removing android-cache-fix-gradle-plugin from the project dependencies.
    See the plugin documentation to learn how to apply this plugin to your project.
  • android: Don't apply proguard-android-optimize.txt rules by default.
    If you need these rules, apply it manually:
    android {
        defaultConfig {
            proguardFile(getDefaultProguardFile("proguard-android-optimize.txt"))
        }
    }
  • android: Do not add LOCK_ORIENTATION and CRASH_REPORTS_ENABLED variables to BuildConfig implicitly
  • kotlin: Don't set allWarningsAsErrors flag implicitly.
    It was impossible to disable this feature.
    To keep going with the old behavior, add the following code to your build script:
    val warningsAsErrors = findProperty("warningsAsErrors") == "true" || isRunningOnCi
    tasks.withType<KotlinJvmCompile>().configureEach {
        compilerOptions.allWarningsAsErrors = warningsAsErrors
    }

Other Changes

  • android: Use ANDROID_BUILD_TOOLS_VERSION env variable for buildToolsVersion if the option is not configured (#132)
  • android: Make an extension Project.collectProguardFiles public
  • android: Add the option redmadrobot.android.ndkVersion to specify NDK version for all android modules
  • android: Remove the workaround for Explicit API enabling as the issue has been fixed in Kotlin 1.9
  • android: Remove disabling of build features aidl, renderScript and buildConfig as they are already disabled by default in new versions of AGP
  • kotlin: Deprecate accessor kotlinCompile.
    It is recommended to use kotlin.compilerOptions { ... } to configure compilation instead.
  • Update Gradle to 8.9

Dependencies

Dependency Minimal version
Gradle 7.48.0
Kotlin Gradle Plugin 1.7.101.9.0
Android Gradle Plugin 7.4.08.4.0

infrastructure-kotlin:

infrastructure-android:

  • Android Gradle Plugin 7.4.28.5.1
  • Remove android-cache-fix-gradle-plugin from dependencies
  • Remove com.android.tools:common from dependencies

infrastructure-detekt: