[go: nahoru, domu]

Moving the validation of Gradle project subsets into a unit test

so that this can run in parallel with other tasks rather than serially before the main build.
This should save approximately 3m3s of build time at the beginning of androidx.sh.
This new task takes 45s to run on its own, so it should increase androidx_host_tests.sh by no more than that amount (and in practice it should increase by much less due to parallelization).

Bug: 180012150

Test: sed -i 's/BuildType.MAIN, BuildType.FLAN, BuildType.COMPOSE, BuildType.WEAR/BuildType.WEAR/' settings.gradle && ./gradlew :buildSrc-tests:project-subsets:test # and see that this task catches the error

Test: echo >> ../settings.gradle && ./gradlew :buildSrc-tests:project-subsets:test # and see that the test reruns

Test: ./busytown/androidx_host_tests.sh -m | grep "buildSrc-tests:project-subsets:test" # and see that this tasks runs

Test: ./gradlew :buildSrc-tests:project-subsets:test -PverifyUpToDate # and see that this passes

Change-Id: I372a178a52fdb7296c5d60e755f9cb8c4f25eb08
diff --git a/settings.gradle b/settings.gradle
index 6e1bd55..819e4296 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -195,6 +195,7 @@
     includeProject(":buildSrc-tests:max-dep-versions:buildSrc-tests-max-dep-versions-dep", "buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-dep", [BuildType.MAIN])
     includeProject(":buildSrc-tests:max-dep-versions:buildSrc-tests-max-dep-versions-main", "buildSrc-tests/max-dep-versions/buildSrc-tests-max-dep-versions-main", [BuildType.MAIN])
 }
+includeProject(":buildSrc-tests:project-subsets", "buildSrc-tests/project-subsets", [BuildType.MAIN])
 includeProject(":camera:camera-camera2", "camera/camera-camera2", [BuildType.MAIN])
 includeProject(":camera:camera-camera2-pipe", "camera/camera-camera2-pipe", [BuildType.MAIN])
 includeProject(":camera:camera-camera2-pipe-integration", "camera/camera-camera2-pipe-integration", [BuildType.MAIN])