Add no_framework_libs property
Add a no_framework_libs property similar to no_standard_libs. The new property will allow modules to continue to link against the standard bootclasspath libraries that contain java.*, but not against the framework libraries. This avoids having to specify the bootclasspath libraries explicitly. Test: m -j checkbuild Change-Id: I0be13a45cadca9b90a0fd1797885cd18c5b462e3
This commit is contained in:
parent
b93479bed6
commit
fa5eb23df6
1 changed files with 8 additions and 2 deletions
10
java/java.go
10
java/java.go
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue