diff options
author | Colin Cross <ccross@android.com> | 2017-11-22 16:20:45 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-11-29 20:47:42 -0800 |
commit | 5ab4e6d817cc1eec81e7fa3ae9d547a0ba94919c (patch) | |
tree | c9b6be84034d1b74a7d42683b520fef38b3145b9 /java/java.go | |
parent | 46029a4131ae035d85c5e60871b5156bfc36e784 (diff) |
Allow building framework.jar and framework-res.apk
Update app support enough to build framework-res.apk, link
framework.jar against its generated files, and export it to
make.
Bug: 69917341
Test: m checkbuild tests docs
Change-Id: I7db29cd1f5fabb22e844483ecc7c38abfedbbe0a
Diffstat (limited to 'java/java.go')
-rw-r--r-- | java/java.go | 12 |
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 { |