• Home
Name Date Size #Lines LOC

..--

allowedLicenses/08-Apr-2025-204173

apply/08-Apr-2025-6042

blank-proguard-rules/08-Apr-2025-21

blank-res-api/08-Apr-2025-

gradle/08-Apr-2025-

imports/08-Apr-2025-235194

jetpad-integration/08-Apr-2025-10256

karmaconfig/08-Apr-2025-3121

lint/08-Apr-2025-8931

plugins/08-Apr-2025-371204

private/08-Apr-2025-24,28017,068

public/08-Apr-2025-2,5311,493

res/values/08-Apr-2025-224

settingsScripts/08-Apr-2025-430398

src/main/resources/08-Apr-2025-105

stableAidlImports/android/08-Apr-2025-44156

OWNERSD08-Apr-2025470 1411

README.mdD08-Apr-20251.8 KiB3123

build.gradleD08-Apr-2025811 3326

gradle.propertiesD08-Apr-20255.3 KiB

gradlewD08-Apr-20257.9 KiB23598

kotlin-dsl-dependency.gradleD08-Apr-20251.6 KiB3633

ndk.gradleD08-Apr-202545 43

repos.gradleD08-Apr-20253.4 KiB9994

settings.gradleD08-Apr-20252.2 KiB5652

shared-dependencies.gradleD08-Apr-20252.7 KiB6349

shared.gradleD08-Apr-20251.1 KiB4536

vnames.jsonD08-Apr-2025478 3535

README.md

1This is the buildSrc project.
2Gradle builds (and tests) this project before the other projects, and Gradle adds its artifacts into the classpath of the other projects when configuring them.
3
4Tests for the buildSrc project are located in the buildSrc-tests project, so that the build doesn't need to wait for those tests to complete
5
6To run these tests you can run `./gradlew :buildSrc-tests:test`
7
8For information about Gradle's configuration caching, see:
9  *  https://medium.com/androiddevelopers/configuration-caching-deep-dive-bcb304698070
10  *  https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
11  *  https://github.com/gradle/gradle/issues/17813
12
13The buildSrc directory is split into multiple projects based on what needs to be available on the classpath when parsing build.gradle files outside of buildSrc.
14Any classes that Gradle puts on the classpath for parsing build.gradle files can theoretically overwrite the implementation of tasks in those projects.
15So, if a class is on that classpath and it changes, then Gradle is not confident that the task is necessarily up-to-date and Gradle will rerun it.
16So, we move as many classes as possible off of this classpath by applying them from within a separate .gradle script instead.
17
18To verify that classes in private/ don't unnecessarily affect the up-to-datedness status of tasks from outside plugins, try something like this:
19
20```
21  # run a kotlin compilation task
22  ./gradlew :core:core:compileDebugKotlin
23  # make some unrelated changes in buildSrc:
24  sed -i 's/ignoreCase = true/ignoreCase = false/g' buildSrc/private/src/main/kotlin/androidx/build/ErrorProneConfiguration.kt
25  # rerun same kotlin compilation task
26  ./gradlew :core:core:compileDebugKotlin | cat
27  # see that the tasks were up-to-date
28```
29
30See also b/140265324 for more information.
31