summaryrefslogtreecommitdiff
path: root/java/androidmk.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2025-01-24 00:25:30 +0000
committer Jihoon Kang <jihoonkang@google.com> 2025-01-28 06:19:58 +0000
commitd406381eadbbd411833a3e6829c9f2ade29da7ba (patch)
treee67c2f15267feb885d4fe6de6bbfcdffa3f66c9c /java/androidmk.go
parentf83bfb1ef01fc8eb46dfc400dcdefe6713e72306 (diff)
Convert java modules' module-info.json to Soong
This change converts the module-info.json of java_library and other java modules that call java_library's GenerateAndroidBuildActions() in its GenerateAndroidBuildActions() to Soong. Bug: 389720048 Test: Inspect module-info.json diff, CI Change-Id: I0db5ae3a5fb41bb60dc538aea2d8e614c9ae23d4
Diffstat (limited to 'java/androidmk.go')
-rw-r--r--java/androidmk.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index 039e847a7..e0a86b597 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -23,13 +23,12 @@ import (
"github.com/google/blueprint/proptools"
)
-func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries {
- hostDexNeeded := Bool(library.deviceProperties.Hostdex) && !library.Host()
- if library.hideApexVariantFromMake {
- hostDexNeeded = false
- }
+func (library *Library) hostDexNeeded() bool {
+ return Bool(library.deviceProperties.Hostdex) && !library.Host() && !library.hideApexVariantFromMake
+}
- if hostDexNeeded {
+func (library *Library) AndroidMkEntriesHostDex() android.AndroidMkEntries {
+ if library.hostDexNeeded() {
var output android.Path
if library.dexJarFile.IsSet() {
output = library.dexJarFile.Path()