Merge "Add property Skip_jarjar_repackage" into main
This commit is contained in:
commit
5ae58dcabe
1 changed files with 10 additions and 5 deletions
15
java/base.go
15
java/base.go
|
@ -95,6 +95,9 @@ type CommonProperties struct {
|
|||
// if not blank, used as prefix to generate repackage rule
|
||||
Jarjar_prefix *string
|
||||
|
||||
// if set to true, skip the jarjar repackaging
|
||||
Skip_jarjar_repackage *bool
|
||||
|
||||
// If not blank, set the java version passed to javac as -source and -target
|
||||
Java_version *string
|
||||
|
||||
|
@ -1101,11 +1104,13 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars, extraClasspath
|
|||
jarjarProviderData := j.collectJarJarRules(ctx)
|
||||
if jarjarProviderData != nil {
|
||||
android.SetProvider(ctx, JarJarProvider, *jarjarProviderData)
|
||||
text := getJarJarRuleText(jarjarProviderData)
|
||||
if text != "" {
|
||||
ruleTextFile := android.PathForModuleOut(ctx, "repackaged-jarjar", "repackaging.txt")
|
||||
android.WriteFileRule(ctx, ruleTextFile, text)
|
||||
j.repackageJarjarRules = ruleTextFile
|
||||
if !proptools.Bool(j.properties.Skip_jarjar_repackage) {
|
||||
text := getJarJarRuleText(jarjarProviderData)
|
||||
if text != "" {
|
||||
ruleTextFile := android.PathForModuleOut(ctx, "repackaged-jarjar", "repackaging.txt")
|
||||
android.WriteFileRule(ctx, ruleTextFile, text)
|
||||
j.repackageJarjarRules = ruleTextFile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue