aboutsummaryrefslogtreecommitdiffstats
path: root/java/config
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-05-24 16:11:20 -0700
committerColin Cross <ccross@android.com>2018-07-11 05:52:26 +0000
commitcfae5a6e2c095f97be2f6e503048f43e2d6d7e05 (patch)
treec89dcba0feacd729c9506fe397e31055734d1118 /java/config
parent322ab10d5a96eb9bda5165222a71eeb21261f4ed (diff)
downloadbuild_soong-cfae5a6e2c095f97be2f6e503048f43e2d6d7e05.tar.gz
build_soong-cfae5a6e2c095f97be2f6e503048f43e2d6d7e05.tar.bz2
build_soong-cfae5a6e2c095f97be2f6e503048f43e2d6d7e05.zip
Use manifest merger in Soong
Move the manifest merger config to Soong, and use it to merge manifests of static dependencies of android_library and android_app modules. Bug: 110848854 Test: m checkbuild Change-Id: Ib89e1f1a52a8b76157e4e0348baf42800412df0d
Diffstat (limited to 'java/config')
-rw-r--r--java/config/config.go13
-rw-r--r--java/config/makevars.go4
2 files changed, 17 insertions, 0 deletions
diff --git a/java/config/config.go b/java/config/config.go
index da687590..4863fec3 100644
--- a/java/config/config.go
+++ b/java/config/config.go
@@ -44,6 +44,16 @@ var (
"core-oj",
"core-libart",
}
+
+ ManifestMergerClasspath = []string{
+ "prebuilts/gradle-plugin/com/android/tools/build/manifest-merger/26.1.0/manifest-merger-26.1.0.jar",
+ "prebuilts/gradle-plugin/com/android/tools/common/26.1.0/common-26.1.0.jar",
+ "prebuilts/gradle-plugin/com/android/tools/sdk-common/26.1.0/sdk-common-26.1.0.jar",
+ "prebuilts/gradle-plugin/com/android/tools/sdklib/26.1.0/sdklib-26.1.0.jar",
+ "prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-runtime/1.0.5/kotlin-runtime-1.0.5.jar",
+ "prebuilts/gradle-plugin/org/jetbrains/kotlin/kotlin-stdlib/1.1.3/kotlin-stdlib-1.1.3.jar",
+ "prebuilts/misc/common/guava/guava-21.0.jar",
+ }
)
func init() {
@@ -136,4 +146,7 @@ func init() {
hostBinToolVariableWithPrebuilt("Aapt2Cmd", "prebuilts/sdk/tools", "aapt2")
pctx.SourcePathVariable("ManifestFixerCmd", "build/soong/scripts/manifest_fixer.py")
+
+ pctx.SourcePathsVariable("ManifestMergerJars", " ", ManifestMergerClasspath...)
+ pctx.SourcePathsVariable("ManifestMergerClasspath", ":", ManifestMergerClasspath...)
}
diff --git a/java/config/makevars.go b/java/config/makevars.go
index d3788774..275f4966 100644
--- a/java/config/makevars.go
+++ b/java/config/makevars.go
@@ -73,4 +73,8 @@ func makeVarsProvider(ctx android.MakeVarsContext) {
ctx.Strict("EXTRACT_JAR_PACKAGES", "${ExtractJarPackagesCmd}")
ctx.Strict("MANIFEST_FIXER", "${ManifestFixerCmd}")
+
+ ctx.Strict("ANDROID_MANIFEST_MERGER_DEPS", "${ManifestMergerJars}")
+ ctx.Strict("ANDROID_MANIFEST_MERGER",
+ "${JavaCmd} -classpath ${ManifestMergerClasspath} com.android.manifmerger.Merger")
}