Merge "Add no_framework_libs property"

This commit is contained in:
Treehugger Robot 2017-10-03 01:39:13 +00:00 committed by Gerrit Code Review
commit 5a727dfa11
1 changed files with 8 additions and 2 deletions

View File

@ -81,10 +81,14 @@ type CompilerProperties struct {
// list of files that should be excluded from java_resources
Exclude_java_resources []string `android:"arch_variant"`
// don't build against the default libraries (legacy-test, core-junit,
// don't build against the default libraries (bootclasspath, legacy-test, core-junit,
// ext, and framework for device targets)
No_standard_libs *bool
// don't build against the framework libraries (legacy-test, core-junit,
// ext, and framework for device targets)
No_framework_libs *bool
// list of module-specific flags that will be used for javac compiles
Javacflags []string `android:"arch_variant"`
@ -262,7 +266,9 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
sdkDep := decodeSdkDep(ctx, j.deviceProperties.Sdk_version)
if sdkDep.useDefaultLibs {
ctx.AddDependency(ctx.Module(), bootClasspathTag, config.DefaultBootclasspathLibraries...)
ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...)
if !proptools.Bool(j.properties.No_framework_libs) {
ctx.AddDependency(ctx.Module(), libTag, config.DefaultLibraries...)
}
}
if sdkDep.useModule {
ctx.AddDependency(ctx.Module(), bootClasspathTag, sdkDep.module)