Extract classes out of jarjar jar for static java libraries

jarjar modifies the .class files in a jar, when using static java
library dependencies we need to use the modified class files and
not the ones that javac produced.  If jarjar is enabled, use
the prebuilt jar extractor to get the classes out of classes-jarjar.jar
and export them through j.classJarSpecs.

Change-Id: Ia2854f1c26d630da12cab7c421007aad4f793ecd
This commit is contained in:
Colin Cross 2015-04-10 17:05:07 -07:00
parent 9b6826f7cf
commit 2097830df7
1 changed files with 5 additions and 3 deletions

View File

@ -283,9 +283,6 @@ func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) {
return
}
j.classJarSpecs = classJarSpecs
j.resourceJarSpecs = resourceJarSpecs
if j.properties.Jarjar_rules != "" {
jarjar_rules := filepath.Join(common.ModuleSrcDir(ctx), j.properties.Jarjar_rules)
// Transform classes-full-debug.jar into classes-jarjar.jar
@ -293,8 +290,13 @@ func (j *javaBase) GenerateJavaBuildActions(ctx common.AndroidModuleContext) {
if ctx.Failed() {
return
}
classes, _ := TransformPrebuiltJarToClasses(ctx, outputFile)
classJarSpecs = []jarSpec{classes}
}
j.resourceJarSpecs = resourceJarSpecs
j.classJarSpecs = classJarSpecs
j.classpathFile = outputFile
if j.properties.Dex && len(srcFiles) > 0 {