summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go29
1 files changed, 2 insertions, 27 deletions
diff --git a/java/java.go b/java/java.go
index 9cde82408..3726435e9 100644
--- a/java/java.go
+++ b/java/java.go
@@ -153,9 +153,6 @@ type Module struct {
// output file containing classes.dex
dexJarFile android.Path
- // output files containing resources
- resourceJarFiles android.Paths
-
// output file suitable for installing or running
outputFile android.Path
@@ -173,7 +170,6 @@ type Module struct {
type Dependency interface {
ClasspathFiles() android.Paths
- ResourceJarFiles() android.Paths
AidlIncludeDirs() android.Paths
}
@@ -380,7 +376,6 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
case staticLibTag:
deps.classpath = append(deps.classpath, dep.ClasspathFiles()...)
deps.staticJars = append(deps.staticJars, dep.ClasspathFiles()...)
- deps.staticJarResources = append(deps.staticJarResources, dep.ResourceJarFiles()...)
case frameworkResTag:
if ctx.ModuleName() == "framework" {
// framework.jar has a one-off dependency on the R.java and Manifest.java files
@@ -492,20 +487,14 @@ func (j *Module) compile(ctx android.ModuleContext) {
}
if len(resArgs) > 0 {
- // Combine classes + resources into classes-full-debug.jar
resourceJar := TransformResourcesToJar(ctx, resArgs, resDeps)
if ctx.Failed() {
return
}
- j.resourceJarFiles = append(j.resourceJarFiles, resourceJar)
jars = append(jars, resourceJar)
}
- // Propagate the resources from the transitive closure of static dependencies for copying
- // into dex jars
- j.resourceJarFiles = append(j.resourceJarFiles, deps.staticJarResources...)
-
// static classpath jars have the resources in them, so the resource jars aren't necessary here
jars = append(jars, deps.staticJars...)
@@ -580,17 +569,12 @@ func (j *Module) compile(ctx android.ModuleContext) {
return
}
- // Compile classes.jar into classes.dex
- dexJarFile := TransformClassesJarToDexJar(ctx, desugarJar, flags)
+ // Compile classes.jar into classes.dex and then javalib.jar
+ outputFile = TransformClassesJarToDexJar(ctx, "javalib.jar", desugarJar, flags)
if ctx.Failed() {
return
}
- jars := android.Paths{dexJarFile}
- jars = append(jars, j.resourceJarFiles...)
-
- outputFile = TransformJarsToJar(ctx, "javalib.jar", jars, android.OptionalPath{}, true)
-
j.dexJarFile = outputFile
}
ctx.CheckbuildFile(outputFile)
@@ -607,10 +591,6 @@ func (j *Module) ClasspathFiles() android.Paths {
return android.Paths{j.classpathFile}
}
-func (j *Module) ResourceJarFiles() android.Paths {
- return j.resourceJarFiles
-}
-
func (j *Module) AidlIncludeDirs() android.Paths {
return j.exportAidlIncludeDirs
}
@@ -777,11 +757,6 @@ func (j *Import) ClasspathFiles() android.Paths {
return j.classpathFiles
}
-func (j *Import) ResourceJarFiles() android.Paths {
- // resources are in the ClasspathFiles
- return nil
-}
-
func (j *Import) AidlIncludeDirs() android.Paths {
return nil
}