Splitting buildSrc into multiple projects
:buildSrc:plugins contains the plugins applied by projects
:buildSrc:private contains implementation
This allows the contents of plugins/ to not be added to the classpath that Gradle uses for evaluating projects, which means that changes to those classes don't necessarily invalidate the UP-TO-DATE status of other tasks applied by other plugins in those projects (most notably compileKotlin)
Bug: 140265324
Test: ./gradlew projects
Test: cd paging && ./gradlew checkApi
Test: Treehugger runs busytown/androidx.sh
Test: # demonstrate that unrelated changes in buildSrc no longer invalidate compileKotlin tasks unnecessarily
# build kotlin
./gradlew :core:core:compileDebugKotlin
# make some unrelated changes in buildSrc:
sed -i 's/ignoreCase = true/ignoreCase = false/g' buildSrc/private/src/main/kotlin/androidx/build/ErrorProneConfiguration.kt
# build kotlin again
./gradlew :core:core:compileDebugKotlin
# see that the tasks were up-to-date
Test: # demonstrate that making a relevant change in buildSrc does invalidate kotlinCompile tasks
1: # change jvmTarget
sed -i 's/jvmTarget = "1.8"/jvmTarget = "9"/' buildSrc/impl/src/main/kotlin/androidx/build/AndroidXImplPlugin.kt
2: # run another build
./gradlew :core:core:compileDebugKotlin
3: # see that this task was out-of-date
Change-Id: I8fb321ca59f9eb0518f730748489a34f376de605
diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle
index 28bcb0f..3d32906 100644
--- a/buildSrc/settings.gradle
+++ b/buildSrc/settings.gradle
@@ -15,6 +15,8 @@
*/
include ":jetpad-integration"
+include ":plugins"
+include ":private"
enableFeaturePreview("VERSION_CATALOGS")