Introduce AlwaysUsePrebuiltSdks
Instead of UnbundledBuild, use AlwaysUsePrebuiltSdks
to determine if java modules needs to be built against prebuilt sdks.
And rename UnbundledBuildUsePrebuiltSdks to AlwaysUsePrebuiltSdks to
express its behavior more correctly.(It can be orthgonal to "Unbundled")
Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: I0be7265c1959d8774c295372cd7a9250169f6df9
diff --git a/java/lint.go b/java/lint.go
index 1bf7f69..f2091db 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -309,7 +309,7 @@
rule.Command().Text("mkdir -p").Flag(cacheDir.String()).Flag(homeDir.String())
var annotationsZipPath, apiVersionsXMLPath android.Path
- if ctx.Config().UnbundledBuildUsePrebuiltSdks() {
+ if ctx.Config().AlwaysUsePrebuiltSdks() {
annotationsZipPath = android.PathForSource(ctx, "prebuilts/sdk/current/public/data/annotations.zip")
apiVersionsXMLPath = android.PathForSource(ctx, "prebuilts/sdk/current/public/data/api-versions.xml")
} else {
@@ -395,7 +395,7 @@
}
func (l *lintSingleton) copyLintDependencies(ctx android.SingletonContext) {
- if ctx.Config().UnbundledBuildUsePrebuiltSdks() {
+ if ctx.Config().AlwaysUsePrebuiltSdks() {
return
}