Add jetifier support in Soong.
This is a blocker for droiddoc targets migration under vendor/. Test: N/A Bug: b/72552006 Change-Id: If85a0917c1ac0d88b9d5b488216a638b4dabd39f
This commit is contained in:
12
java/aar.go
12
java/aar.go
@@ -375,6 +375,9 @@ type AARImportProperties struct {
|
||||
|
||||
Static_libs []string
|
||||
Libs []string
|
||||
|
||||
// if set to true, run Jetifier against .aar file. Defaults to false.
|
||||
Jetifier_enabled *bool
|
||||
}
|
||||
|
||||
type AARImport struct {
|
||||
@@ -456,7 +459,14 @@ func (a *AARImport) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
return
|
||||
}
|
||||
|
||||
aar := android.PathForModuleSrc(ctx, a.properties.Aars[0])
|
||||
aarName := ctx.ModuleName() + ".aar"
|
||||
var aar android.Path
|
||||
aar = android.PathForModuleSrc(ctx, a.properties.Aars[0])
|
||||
if Bool(a.properties.Jetifier_enabled) {
|
||||
inputFile := aar
|
||||
aar = android.PathForModuleOut(ctx, "jetifier", aarName)
|
||||
TransformJetifier(ctx, aar.(android.WritablePath), inputFile)
|
||||
}
|
||||
|
||||
extractedAARDir := android.PathForModuleOut(ctx, "aar")
|
||||
extractedResDir := extractedAARDir.Join(ctx, "res")
|
||||
|
Reference in New Issue
Block a user