summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2020-08-15 06:52:17 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-08-15 06:52:17 +0000
commitbe9a9035f2bb9494b09e7447b62986b43d2a99b0 (patch)
treebde3af3e1a8388c03dae6878b5fed7df303bab28 /java
parentce59a881376e873559a90c423aa87b970e3d2377 (diff)
parenta07777d4341ea598959b5d69c306a8390007efda (diff)
Merge "Rename ApexName to ApexVariationName" am: a07777d434
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1399831 Change-Id: Ia9682ee4bbf068131fa6f807f9f74075faba14ed
Diffstat (limited to 'java')
-rw-r--r--java/dexpreopt_bootjars.go6
-rw-r--r--java/java.go2
-rw-r--r--java/sdk_library.go8
3 files changed, 8 insertions, 8 deletions
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index b44545647..2a84f14dc 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -262,7 +262,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
apex, isApexModule := module.(android.ApexModule)
fromUpdatableApex := isApexModule && apex.Updatable()
if image.name == artBootImageName {
- if isApexModule && strings.HasPrefix(apex.ApexName(), "com.android.art.") {
+ if isApexModule && strings.HasPrefix(apex.ApexVariationName(), "com.android.art.") {
// ok: found the jar in the ART apex
} else if isApexModule && apex.IsForPlatform() && Bool(module.(*Library).deviceProperties.Hostdex) {
// exception (skip and continue): special "hostdex" platform variant
@@ -272,7 +272,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
return -1, nil
} else if fromUpdatableApex {
// error: this jar is part of an updatable apex other than ART
- ctx.Errorf("module '%s' from updatable apex '%s' is not allowed in the ART boot image", name, apex.ApexName())
+ ctx.Errorf("module '%s' from updatable apex '%s' is not allowed in the ART boot image", name, apex.ApexVariationName())
} else {
// error: this jar is part of the platform or a non-updatable apex
ctx.Errorf("module '%s' is not allowed in the ART boot image", name)
@@ -282,7 +282,7 @@ func getBootImageJar(ctx android.SingletonContext, image *bootImageConfig, modul
// ok: this jar is part of the platform or a non-updatable apex
} else {
// error: this jar is part of an updatable apex
- ctx.Errorf("module '%s' from updatable apex '%s' is not allowed in the framework boot image", name, apex.ApexName())
+ ctx.Errorf("module '%s' from updatable apex '%s' is not allowed in the framework boot image", name, apex.ApexVariationName())
}
} else {
panic("unknown boot image: " + image.name)
diff --git a/java/java.go b/java/java.go
index d5375a5b3..10c6fd369 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1680,7 +1680,7 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) {
j.linter.compileSdkVersion = lintSDKVersionString(j.sdkVersion())
j.linter.javaLanguageLevel = flags.javaVersion.String()
j.linter.kotlinLanguageLevel = "1.3"
- if j.ApexName() != "" && ctx.Config().UnbundledBuildApps() {
+ if j.ApexVariationName() != "" && ctx.Config().UnbundledBuildApps() {
j.linter.buildModuleReportZip = true
}
j.linter.lint(ctx)
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 25f0134aa..2aae42fc9 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1379,7 +1379,7 @@ func PrebuiltJars(ctx android.BaseModuleContext, baseName string, s sdkSpec) and
// Get the apex name for module, "" if it is for platform.
func getApexNameForModule(module android.Module) string {
if apex, ok := module.(android.ApexModule); ok {
- return apex.ApexName()
+ return apex.ApexVariationName()
}
return ""
@@ -1390,7 +1390,7 @@ func getApexNameForModule(module android.Module) string {
// If either this or the other module are on the platform then this will return
// false.
func withinSameApexAs(module android.ApexModule, other android.Module) bool {
- name := module.ApexName()
+ name := module.ApexVariationName()
return name != "" && getApexNameForModule(other) == name
}
@@ -2083,8 +2083,8 @@ func (module *sdkLibraryXml) ShouldSupportSdkVersion(ctx android.BaseModuleConte
// File path to the runtime implementation library
func (module *sdkLibraryXml) implPath() string {
implName := proptools.String(module.properties.Lib_name)
- if apexName := module.ApexName(); apexName != "" {
- // TODO(b/146468504): ApexName() is only a soong module name, not apex name.
+ if apexName := module.ApexVariationName(); apexName != "" {
+ // TODO(b/146468504): ApexVariationName() is only a soong module name, not apex name.
// In most cases, this works fine. But when apex_name is set or override_apex is used
// this can be wrong.
return fmt.Sprintf("/apex/%s/javalib/%s.jar", apexName, implName)