Merge "Use R.txt files from aar files directly" into main am: 4b6a3ae65c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2980833 Change-Id: I2f91f88d0d347e598ddda2dbbeb67b4fc9d19da6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
d2820e81aa
1 changed files with 4 additions and 4 deletions
|
@ -1136,7 +1136,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
extractedAARDir := android.PathForModuleOut(ctx, "aar")
|
extractedAARDir := android.PathForModuleOut(ctx, "aar")
|
||||||
a.classpathFile = extractedAARDir.Join(ctx, "classes-combined.jar")
|
a.classpathFile = extractedAARDir.Join(ctx, "classes-combined.jar")
|
||||||
a.manifest = extractedAARDir.Join(ctx, "AndroidManifest.xml")
|
a.manifest = extractedAARDir.Join(ctx, "AndroidManifest.xml")
|
||||||
aarRTxt := extractedAARDir.Join(ctx, "R.txt")
|
a.rTxt = extractedAARDir.Join(ctx, "R.txt")
|
||||||
a.assetsPackage = android.PathForModuleOut(ctx, "assets.zip")
|
a.assetsPackage = android.PathForModuleOut(ctx, "assets.zip")
|
||||||
a.proguardFlags = extractedAARDir.Join(ctx, "proguard.txt")
|
a.proguardFlags = extractedAARDir.Join(ctx, "proguard.txt")
|
||||||
android.SetProvider(ctx, ProguardSpecInfoProvider, ProguardSpecInfo{
|
android.SetProvider(ctx, ProguardSpecInfoProvider, ProguardSpecInfo{
|
||||||
|
@ -1150,7 +1150,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
Rule: unzipAAR,
|
Rule: unzipAAR,
|
||||||
Input: a.aarPath,
|
Input: a.aarPath,
|
||||||
Outputs: android.WritablePaths{a.classpathFile, a.proguardFlags, a.manifest, a.assetsPackage, aarRTxt},
|
Outputs: android.WritablePaths{a.classpathFile, a.proguardFlags, a.manifest, a.assetsPackage, a.rTxt},
|
||||||
Description: "unzip AAR",
|
Description: "unzip AAR",
|
||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"outDir": extractedAARDir.String(),
|
"outDir": extractedAARDir.String(),
|
||||||
|
@ -1168,7 +1168,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
|
|
||||||
a.exportPackage = android.PathForModuleOut(ctx, "package-res.apk")
|
a.exportPackage = android.PathForModuleOut(ctx, "package-res.apk")
|
||||||
proguardOptionsFile := android.PathForModuleGen(ctx, "proguard.options")
|
proguardOptionsFile := android.PathForModuleGen(ctx, "proguard.options")
|
||||||
a.rTxt = android.PathForModuleOut(ctx, "R.txt")
|
aaptRTxt := android.PathForModuleOut(ctx, "R.txt")
|
||||||
a.extraAaptPackagesFile = android.PathForModuleOut(ctx, "extra_packages")
|
a.extraAaptPackagesFile = android.PathForModuleOut(ctx, "extra_packages")
|
||||||
|
|
||||||
var linkDeps android.Paths
|
var linkDeps android.Paths
|
||||||
|
@ -1205,7 +1205,7 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
transitiveAssets := android.ReverseSliceInPlace(staticDeps.assets())
|
transitiveAssets := android.ReverseSliceInPlace(staticDeps.assets())
|
||||||
aapt2Link(ctx, a.exportPackage, nil, proguardOptionsFile, a.rTxt,
|
aapt2Link(ctx, a.exportPackage, nil, proguardOptionsFile, aaptRTxt,
|
||||||
linkFlags, linkDeps, nil, overlayRes, transitiveAssets, nil, nil)
|
linkFlags, linkDeps, nil, overlayRes, transitiveAssets, nil, nil)
|
||||||
|
|
||||||
a.rJar = android.PathForModuleOut(ctx, "busybox/R.jar")
|
a.rJar = android.PathForModuleOut(ctx, "busybox/R.jar")
|
||||||
|
|
Loading…
Reference in a new issue