Gradle for mobile developers (5 Part Series)
On our road through history of Gradle versions and their value to mobile developers we already stop at Gradle 5.0 and Gradle 5.1.
In this post I'd like to summarize minor updates in Gradle 5.2 - Gradle 5.5 versions together as they do not add much to our story individually.
Gradle 5.2 (docs) - February 2019
The only mentionable change is a package of Annotation processor improvements that makes your life together with them a little bit easier.
Gradle 5.3 (docs) - March 2019
There are two features I'd like to point out, that won't affect your project builds directly, rather being important for the future enhancements.
Type-safe accessors in precompiled script plugins (docs)
Behind this mouthful set of Gradle specific buzzwords is a technical change that simplifies the way how to structure the build logic.
This topic is a candidate for a blog post on its own, but in short it is about moving all the Gradle build logic pieces out of your
build.gradle.kts files to
buildSrc directory which is a so called "included build" for every Gradle project.
Till then, Gradle User Guide has a standalone page for this topic called "Organizing Gradle Projects".
Gradle Module Metadata 1.0 (docs)
Gradle Module Metadata (GMM) were created as a replacement for Maven
pom.xml files as those are simply not rich enough to solve many dependency management problems.
This is not something that mobile developers will directly work with every day. The main reason I'm excited about this is it allows building Kotlin Multiplatform projects with Gradle. From the docs:
The publications of a multiplatform library may include a special 'root' module that stands for the whole library and is automatically resolved to the appropriate platform-specific artifacts when added as a dependency, as described below.
Gradle will automatically consume published Gradle Metadata, but publications don't include any module metadata by default. To enable it , add
enableFeaturePreview("GRADLE_METADATA") to the root project's
Gradle 5.4 (docs) - April 2019
Android developers don't need to care about this release as both Support running Gradle with JDK12 (not much used among Android developers) and Support for Swift 5 (samples) do not really matter to them.
Gradle 5.5 (docs) - June 2019
If you work in a large organization that distributes custom Gradle binaries for its internal purposes (yeah, it happens), you can now define the organization-wide
gradle.properties that will configure Gradle environment for everyone who is using such distribution.
This configured properties have the lowest precedence of any
gradle.properties and properties defined in other locations will override values defined here.
I will cover the Gradle 5.6 version (last release for Gradle 5.x) in the next post.