Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.19 #139

Merged
merged 39 commits into from
Jul 26, 2024
Merged

v0.19 #139

merged 39 commits into from
Jul 26, 2024

Conversation

osipxd
Copy link
Collaborator

@osipxd osipxd commented Jul 17, 2024

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 (android: Use buildToolsVersion from ANDROID_BUILD_TOOLS_VERSION env variable #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:

osipxd added 26 commits April 18, 2023 07:36
@osipxd osipxd self-assigned this Jul 17, 2024
@osipxd osipxd marked this pull request as ready for review July 26, 2024 08:58
@osipxd osipxd changed the title Next release v0.19 Jul 26, 2024
@osipxd osipxd merged commit e39f2f1 into main Jul 26, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant