summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/java/java.go b/java/java.go
index b0fc9db6c..4dd6a490e 100644
--- a/java/java.go
+++ b/java/java.go
@@ -184,10 +184,6 @@ type CompilerProperties struct {
Output_params []string
}
- Sysprop struct {
- Platform *bool
- } `blueprint:"mutated"`
-
Instrument bool `blueprint:"mutated"`
// List of files to include in the META-INF/services folder of the resulting jar.
@@ -290,6 +286,7 @@ type Module struct {
android.ModuleBase
android.DefaultableModuleBase
android.ApexModuleBase
+ android.SdkBase
properties CompilerProperties
protoProperties android.ProtoProperties
@@ -535,7 +532,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
ctx.PropertyErrorf("sdk_version",
`system_modules is required to be set when sdk_version is "none", did you mean "core_platform"`)
} else if *j.deviceProperties.System_modules != "none" {
+ // Add the system modules to both the system modules and bootclasspath.
ctx.AddVariationDependencies(nil, systemModulesTag, *j.deviceProperties.System_modules)
+ ctx.AddVariationDependencies(nil, bootClasspathTag, *j.deviceProperties.System_modules)
}
if ctx.ModuleName() == "android_stubs_current" ||
ctx.ModuleName() == "android_system_stubs_current" ||
@@ -848,6 +847,12 @@ func (j *Module) collectDeps(ctx android.ModuleContext) deps {
}
default:
switch tag {
+ case bootClasspathTag:
+ // If a system modules dependency has been added to the bootclasspath
+ // then add its libs to the bootclasspath.
+ sm := module.(*SystemModules)
+ deps.bootClasspath = append(deps.bootClasspath, sm.headerJars...)
+
case systemModulesTag:
if deps.systemModules != nil {
panic("Found two system module dependencies")
@@ -1633,6 +1638,7 @@ func LibraryFactory() android.Module {
InitJavaModule(module, android.HostAndDeviceSupported)
android.InitApexModule(module)
+ android.InitSdkAwareModule(module)
return module
}
@@ -1913,6 +1919,7 @@ type Import struct {
android.DefaultableModuleBase
android.ApexModuleBase
prebuilt android.Prebuilt
+ android.SdkBase
properties ImportProperties
@@ -2069,6 +2076,7 @@ func ImportFactory() android.Module {
android.InitPrebuiltModule(module, &module.properties.Jars)
InitJavaModule(module, android.HostAndDeviceSupported)
android.InitApexModule(module)
+ android.InitSdkAwareModule(module)
return module
}