summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/java/java.go b/java/java.go
index 82ff827ed..f875c799f 100644
--- a/java/java.go
+++ b/java/java.go
@@ -41,7 +41,6 @@ func init() {
android.RegisterModuleType("java_binary_host", BinaryHostFactory)
android.RegisterModuleType("java_import", ImportFactory)
android.RegisterModuleType("java_import_host", ImportFactoryHost)
- android.RegisterModuleType("android_app", AndroidAppFactory)
android.RegisterSingletonType("logtags", LogtagsSingleton)
}
@@ -206,6 +205,10 @@ type Module struct {
// installed file for binary dependency
installFile android.Path
+
+ // list of .java files and srcjars that was passed to javac
+ compiledJavaSrcs android.Paths
+ compiledSrcJars android.Paths
}
type Dependency interface {
@@ -349,6 +352,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
} else if *j.deviceProperties.System_modules != "none" && ctx.Config().TargetOpenJDK9() {
ctx.AddDependency(ctx.Module(), systemModulesTag, *j.deviceProperties.System_modules)
}
+ if ctx.ModuleName() == "framework" {
+ ctx.AddDependency(ctx.Module(), frameworkResTag, "framework-res")
+ }
}
ctx.AddDependency(ctx.Module(), libTag, j.properties.Libs...)
@@ -612,6 +618,10 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path
}
}
+ // Store the list of .java files that was passed to javac
+ j.compiledJavaSrcs = uniqueSrcFiles
+ j.compiledSrcJars = srcJars
+
enable_sharding := false
if ctx.Device() && !ctx.Config().IsEnvFalse("TURBINE_ENABLED") {
if j.properties.Javac_shard_size != nil && *(j.properties.Javac_shard_size) > 0 {