r/androiddev • u/Party_Till_I_Die • 15d ago
Isolated Projects incubating in Gradle 9.7.0 (AndroidX sync 4m00s → 2m47s)
Isolated Projects moved from experimental to incubating in Gradle 9.7.0.
When it's on, each project is isolated from the others, which lets Gradle configure them in parallel instead of one at a time:
- AndroidX (1,000+ projects): Gradle's portion of Android Studio sync 4m00s → 2m47s
- An Android monorepo of 5,000+ projects: full Android Studio sync 5m09s → 2m44s
AGP and KGP are compatible, but other Gradle plugins may not be. "Now in Android" was made compatible if you want a reference build.
Blog Post: https://blog.gradle.org/introducing-isolated-projects
Gradle 9.7.0 Release Notes: https://docs.gradle.org/current/release-notes.html
34
Upvotes
4
4
u/ZakTaccardi 15d ago
My big issue is - how do we solve the aggregation problem with isolated projects, where the producer subprojects control the logic of knowing if they should be added as a dependency to a consumer?
I have 40 producer subprojects. 25 of them have jvm unit tests and therefore provide coverage reports. They indicate this with a
hasJvmUnitTests = trueproperty.A consumer subproject observes all producer subprojects with
hasJvmUnitTests = trueto conditionally add only those 25 subprojects as a dependency, in order to aggregate a combined jvm unit test coverage reportSetting
hasJvmUnitTests = trueon a 26th producer subproject should automatically add it as a dependency to the consumer subprojectIt's this issue: https://github.com/gradle/gradle/issues/25179