Skip to content

Update Gradle plugin to 3.3.+ #9436

Description

@aforcier

As of this writing, 3.3.2 is the latest Android Gradle plugin. We should update the project to use it. However, at the moment updating to 3.3.+ generates some build warnings:

  • 'variant.getGenerateBuildConfig()' is obsolete
  • 'variant.getExternalNativeBuildTasks()' is obsolete
  • 'variant.getJavaCompile()' is obsolete (2 instances)

The first warning can be resolved by using the new provider config for this Crashlytics task:

android.applicationVariants.all { variant ->
    variant.generateBuildConfig.dependsOn(generateCrashlyticsConfig)
}

to

android.applicationVariants.all { variant ->
    variant.generateBuildConfigProvider.configure {
        dependsOn(generateCrashlyticsConfig)
    }
}

The next warning requires the Fabric gradle plugin to be updated to support 3.3.+ and fix its internal warnings - this has already happened, we just need to update to io.fabric.tools:gradle:1.28.0 when we're ready.

The last set of warnings, and the ones without an easy fix yet for 3.3.+, come from the Bintray plugin used in a few of the subtrees (libs/utils and libs/analytics). The Bintray plugin needs to be updated for that, we'll want to check on that periodically: https://github.com/novoda/bintray-release/releases. (It would be nice if there was a way to ignore this part of the subtree Gradle build when building WPAndroid, since it's irrelevant to actually building WPAndroid - but I don't know of one offhand.)

Note that we can of course update to 3.3.+ whenever we want, they're just warnings - but they're pretty noisy and we may want to hold off a bit if we can until they can be addressed.

cc @jtreanor

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions