aboutsummaryrefslogtreecommitdiffstats
path: root/java/androidmk.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/androidmk.go')
-rw-r--r--java/androidmk.go29
1 files changed, 12 insertions, 17 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index 0700b587..70d0f7f9 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -25,7 +25,7 @@ import (
func (library *Library) AndroidMk() android.AndroidMkData {
return android.AndroidMkData{
Class: "JAVA_LIBRARIES",
- OutputFile: android.OptionalPathForPath(library.implementationAndResourcesJar),
+ OutputFile: android.OptionalPathForPath(library.outputFile),
Include: "$(BUILD_SYSTEM)/soong_java_prebuilt.mk",
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
@@ -42,21 +42,12 @@ func (library *Library) AndroidMk() android.AndroidMkData {
}
if library.dexJarFile != nil {
fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
- if library.deviceProperties.Dex_preopt.Enabled != nil {
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT :=", *library.deviceProperties.Dex_preopt.Enabled)
- }
- if library.deviceProperties.Dex_preopt.App_image != nil {
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT_APP_IMAGE :=", *library.deviceProperties.Dex_preopt.App_image)
- }
- if library.deviceProperties.Dex_preopt.Profile_guided != nil {
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE :=", *library.deviceProperties.Dex_preopt.Profile_guided)
- }
- if library.deviceProperties.Dex_preopt.Profile != nil {
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT_GENERATE_PROFILE := true")
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT_PROFILE_CLASS_LISTING := $(LOCAL_PATH)/"+*library.deviceProperties.Dex_preopt.Profile)
- }
+ }
+ if len(library.dexpreopter.builtInstalled) > 0 {
+ fmt.Fprintln(w, "LOCAL_SOONG_BUILT_INSTALLED :=", strings.Join(library.dexpreopter.builtInstalled, " "))
}
fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", library.sdkVersion())
+ fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", library.implementationAndResourcesJar.String())
fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.headerJarFile.String())
if library.jacocoReportClassesFile != nil {
@@ -84,7 +75,6 @@ func (library *Library) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "LOCAL_MODULE := "+name+"-hostdex")
fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
fmt.Fprintln(w, "LOCAL_MODULE_CLASS := JAVA_LIBRARIES")
- fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", library.implementationAndResourcesJar.String())
if library.installFile == nil {
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
}
@@ -92,6 +82,7 @@ func (library *Library) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", library.dexJarFile.String())
}
fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", library.headerJarFile.String())
+ fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", library.implementationAndResourcesJar.String())
fmt.Fprintln(w, "LOCAL_REQUIRED_MODULES := "+strings.Join(data.Required, " "))
fmt.Fprintln(w, "include $(BUILD_SYSTEM)/soong_java_prebuilt.mk")
}
@@ -128,6 +119,7 @@ func (prebuilt *Import) AndroidMk() android.AndroidMkData {
func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := ", !Bool(prebuilt.properties.Installable))
fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.combinedClasspathFile.String())
+ fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", prebuilt.combinedClasspathFile.String())
fmt.Fprintln(w, "LOCAL_SDK_VERSION :=", prebuilt.sdkVersion())
},
},
@@ -142,8 +134,8 @@ func (prebuilt *AARImport) AndroidMk() android.AndroidMkData {
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", prebuilt.classpathFile.String())
+ fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", prebuilt.classpathFile.String())
fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", prebuilt.exportPackage.String())
fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=", prebuilt.proguardFlags.String())
fmt.Fprintln(w, "LOCAL_SOONG_STATIC_LIBRARY_EXTRA_PACKAGES :=", prebuilt.extraAaptPackagesFile.String())
@@ -164,6 +156,7 @@ func (binary *Binary) AndroidMk() android.AndroidMkData {
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
fmt.Fprintln(w, "LOCAL_SOONG_HEADER_JAR :=", binary.headerJarFile.String())
+ fmt.Fprintln(w, "LOCAL_SOONG_CLASSES_JAR :=", binary.implementationAndResourcesJar.String())
},
},
Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
@@ -250,6 +243,9 @@ func (app *AndroidApp) AndroidMk() android.AndroidMkData {
for _, jniLib := range app.installJniLibs {
fmt.Fprintln(w, "LOCAL_SOONG_JNI_LIBS_"+jniLib.target.Arch.ArchType.String(), "+=", jniLib.name)
}
+ if len(app.dexpreopter.builtInstalled) > 0 {
+ fmt.Fprintln(w, "LOCAL_SOONG_BUILT_INSTALLED :=", strings.Join(app.dexpreopter.builtInstalled, " "))
+ }
},
},
}
@@ -313,7 +309,6 @@ func (a *AndroidLibrary) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "LOCAL_SOONG_EXPORT_PROGUARD_FLAGS :=",
strings.Join(a.exportedProguardFlagFiles.Strings(), " "))
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
- fmt.Fprintln(w, "LOCAL_DEX_PREOPT := false")
})
return data