aboutsummaryrefslogtreecommitdiffstats
path: root/java/java.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-11-30 20:38:15 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-11-30 20:38:15 +0000
commit85c87cef014bd4369af347ab8a108c0549d569d9 (patch)
tree686f57bc265507d0fd7d991847058362f953d8a7 /java/java.go
parent7b6d9b956d11380a8eb5c20cb51b2205f847ab52 (diff)
parent5ab4e6d817cc1eec81e7fa3ae9d547a0ba94919c (diff)
downloadandroid_build_soong-85c87cef014bd4369af347ab8a108c0549d569d9.tar.gz
android_build_soong-85c87cef014bd4369af347ab8a108c0549d569d9.tar.bz2
android_build_soong-85c87cef014bd4369af347ab8a108c0549d569d9.zip
Merge "Allow building framework.jar and framework-res.apk"
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 82ff827e..f875c799 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 {