summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2017-12-13 22:42:59 -0800
committer Colin Cross <ccross@android.com> 2017-12-14 11:25:45 -0800
commit7079856c627369e90fb505d4eb1edd4d56b49dc3 (patch)
treeebee7fe6334a6fd91f6c1174a055b828dd16c1cd /java
parent086ad294cc47295cd9b9bc01085f536287af5e12 (diff)
Remove export_package_resources check when exporting apps to Make
All of the properties for Make were inside an incorrect export_package_resources check, which only worked because the only app so far was framework-res, which had the property set. Test: m checkbuild Change-Id: Idd9be1f497c31b2bd38fee0a83bb4756c6e94305
Diffstat (limited to 'java')
-rw-r--r--java/androidmk.go41
1 files changed, 21 insertions, 20 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index af91a33d0..32ee7ac95 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -152,30 +152,31 @@ func (app *AndroidApp) AndroidMk() android.AndroidMkData {
Include: "$(BUILD_SYSTEM)/soong_app_prebuilt.mk",
Extra: []android.AndroidMkExtraFunc{
func(w io.Writer, outputFile android.Path) {
- if Bool(app.appProperties.Export_package_resources) {
- if app.dexJarFile != nil {
- fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", app.dexJarFile.String())
- }
- fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", app.exportPackage.String())
+ fmt.Fprintln(w, "LOCAL_SOONG_RESOURCE_EXPORT_PACKAGE :=", app.exportPackage.String())
+ if app.dexJarFile != nil {
+ fmt.Fprintln(w, "LOCAL_SOONG_DEX_JAR :=", app.dexJarFile.String())
+ }
+ if app.jacocoReportClassesFile != nil {
+ fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", app.jacocoReportClassesFile.String())
+ }
- if app.jacocoReportClassesFile != nil {
- fmt.Fprintln(w, "LOCAL_SOONG_JACOCO_REPORT_CLASSES_JAR :=", app.jacocoReportClassesFile.String())
- }
+ if app.Name() == "framework-res" {
+ fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
+ // Make base_rules.mk not put framework-res in a subdirectory called
+ // framework_res.
+ fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
+ }
- if app.Name() == "framework-res" {
- fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)")
- // Make base_rules.mk not put framework-res in a subdirectory called
- // framework_res.
- fmt.Fprintln(w, "LOCAL_NO_STANDARD_LIBRARIES := true")
- }
+ if len(app.rroDirs) > 0 {
+ fmt.Fprintln(w, "LOCAL_SOONG_RRO_DIRS :=", strings.Join(app.rroDirs.Strings(), " "))
+ }
- if len(app.rroDirs) > 0 {
- fmt.Fprintln(w, "LOCAL_SOONG_RRO_DIRS :=", strings.Join(app.rroDirs.Strings(), " "))
- }
- fmt.Fprintln(w, "LOCAL_EXPORT_PACKAGE_RESOURCES :=",
- Bool(app.appProperties.Export_package_resources))
- fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", app.manifestPath.String())
+ if Bool(app.appProperties.Export_package_resources) {
+ fmt.Fprintln(w, "LOCAL_EXPORT_PACKAGE_RESOURCES := true")
}
+
+ fmt.Fprintln(w, "LOCAL_FULL_MANIFEST_FILE :=", app.manifestPath.String())
+
},
},
}