Merge "Rename the Default* constants in java/config." am: 8f70db2b48
am: 98d8ee9bd8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353886 Change-Id: Ibf0533b6bd01244d30c5df89aa849a7f8da6f777
This commit is contained in:
commit
8034eafbed
|
@ -28,12 +28,11 @@ import (
|
|||
var (
|
||||
pctx = android.NewPackageContext("android/soong/java/config")
|
||||
|
||||
// TODO(b/157640067): Don't depend on the legacy API by default in the long term.
|
||||
DefaultBootclasspathLibraries = []string{"legacy.core.platform.api.stubs", "core-lambda-stubs"}
|
||||
DefaultSystemModules = "legacy-core-platform-api-stubs-system-modules"
|
||||
DefaultLibraries = []string{"ext", "framework"}
|
||||
DefaultLambdaStubsLibrary = "core-lambda-stubs"
|
||||
SdkLambdaStubsPath = "prebuilts/sdk/tools/core-lambda-stubs.jar"
|
||||
LegacyCorePlatformBootclasspathLibraries = []string{"legacy.core.platform.api.stubs", "core-lambda-stubs"}
|
||||
LegacyCorePlatformSystemModules = "legacy-core-platform-api-stubs-system-modules"
|
||||
FrameworkLibraries = []string{"ext", "framework"}
|
||||
DefaultLambdaStubsLibrary = "core-lambda-stubs"
|
||||
SdkLambdaStubsPath = "prebuilts/sdk/tools/core-lambda-stubs.jar"
|
||||
|
||||
DefaultMakeJacocoExcludeFilter = []string{"org.junit.*", "org.jacoco.*", "org.mockito.*"}
|
||||
DefaultJacocoExcludeFilter = []string{"org.junit.**", "org.jacoco.**", "org.mockito.**"}
|
||||
|
|
|
@ -25,9 +25,11 @@ func init() {
|
|||
}
|
||||
|
||||
func makeVarsProvider(ctx android.MakeVarsContext) {
|
||||
ctx.Strict("TARGET_DEFAULT_JAVA_LIBRARIES", strings.Join(DefaultLibraries, " "))
|
||||
ctx.Strict("TARGET_DEFAULT_BOOTCLASSPATH_LIBRARIES", strings.Join(DefaultBootclasspathLibraries, " "))
|
||||
ctx.Strict("DEFAULT_SYSTEM_MODULES", DefaultSystemModules)
|
||||
ctx.Strict("FRAMEWORK_LIBRARIES", strings.Join(FrameworkLibraries, " "))
|
||||
|
||||
// These are used by make when LOCAL_PRIVATE_PLATFORM_APIS is set (equivalent to platform_apis in blueprint):
|
||||
ctx.Strict("LEGACY_CORE_PLATFORM_BOOTCLASSPATH_LIBRARIES", strings.Join(LegacyCorePlatformBootclasspathLibraries, " "))
|
||||
ctx.Strict("LEGACY_CORE_PLATFORM_SYSTEM_MODULES", LegacyCorePlatformSystemModules)
|
||||
|
||||
ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}")
|
||||
ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}")
|
||||
|
|
|
@ -441,10 +441,10 @@ func (j *Javadoc) addDeps(ctx android.BottomUpMutatorContext) {
|
|||
if ctx.Device() {
|
||||
sdkDep := decodeSdkDep(ctx, sdkContext(j))
|
||||
if sdkDep.useDefaultLibs {
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, config.DefaultBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, systemModulesTag, config.DefaultSystemModules)
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, config.LegacyCorePlatformBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, systemModulesTag, config.LegacyCorePlatformSystemModules)
|
||||
if sdkDep.hasFrameworkLibs() {
|
||||
ctx.AddVariationDependencies(nil, libTag, config.DefaultLibraries...)
|
||||
ctx.AddVariationDependencies(nil, libTag, config.FrameworkLibraries...)
|
||||
}
|
||||
} else if sdkDep.useModule {
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, sdkDep.bootclasspath...)
|
||||
|
|
10
java/java.go
10
java/java.go
|
@ -705,17 +705,17 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
|||
|
||||
sdkDep := decodeSdkDep(ctx, sdkContext(j))
|
||||
if sdkDep.useDefaultLibs {
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, config.DefaultBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, systemModulesTag, config.DefaultSystemModules)
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, config.LegacyCorePlatformBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, systemModulesTag, config.LegacyCorePlatformSystemModules)
|
||||
if sdkDep.hasFrameworkLibs() {
|
||||
ctx.AddVariationDependencies(nil, libTag, config.DefaultLibraries...)
|
||||
ctx.AddVariationDependencies(nil, libTag, config.FrameworkLibraries...)
|
||||
}
|
||||
} else if sdkDep.useModule {
|
||||
ctx.AddVariationDependencies(nil, bootClasspathTag, sdkDep.bootclasspath...)
|
||||
ctx.AddVariationDependencies(nil, java9LibTag, sdkDep.java9Classpath...)
|
||||
if j.deviceProperties.EffectiveOptimizeEnabled() && sdkDep.hasStandardLibs() {
|
||||
ctx.AddVariationDependencies(nil, proguardRaiseTag, config.DefaultBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, proguardRaiseTag, config.DefaultLibraries...)
|
||||
ctx.AddVariationDependencies(nil, proguardRaiseTag, config.LegacyCorePlatformBootclasspathLibraries...)
|
||||
ctx.AddVariationDependencies(nil, proguardRaiseTag, config.FrameworkLibraries...)
|
||||
}
|
||||
}
|
||||
if sdkDep.systemModules != "" {
|
||||
|
|
|
@ -49,27 +49,27 @@ func TestClasspath(t *testing.T) {
|
|||
}{
|
||||
{
|
||||
name: "default",
|
||||
bootclasspath: config.DefaultBootclasspathLibraries,
|
||||
system: config.DefaultSystemModules,
|
||||
java8classpath: config.DefaultLibraries,
|
||||
java9classpath: config.DefaultLibraries,
|
||||
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
|
||||
system: config.LegacyCorePlatformSystemModules,
|
||||
java8classpath: config.FrameworkLibraries,
|
||||
java9classpath: config.FrameworkLibraries,
|
||||
aidl: "-Iframework/aidl",
|
||||
},
|
||||
{
|
||||
name: `sdk_version:"core_platform"`,
|
||||
properties: `sdk_version:"core_platform"`,
|
||||
bootclasspath: config.DefaultBootclasspathLibraries,
|
||||
system: config.DefaultSystemModules,
|
||||
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
|
||||
system: config.LegacyCorePlatformSystemModules,
|
||||
java8classpath: []string{},
|
||||
aidl: "",
|
||||
},
|
||||
{
|
||||
name: "blank sdk version",
|
||||
properties: `sdk_version: "",`,
|
||||
bootclasspath: config.DefaultBootclasspathLibraries,
|
||||
system: config.DefaultSystemModules,
|
||||
java8classpath: config.DefaultLibraries,
|
||||
java9classpath: config.DefaultLibraries,
|
||||
bootclasspath: config.LegacyCorePlatformBootclasspathLibraries,
|
||||
system: config.LegacyCorePlatformSystemModules,
|
||||
java8classpath: config.FrameworkLibraries,
|
||||
java9classpath: config.FrameworkLibraries,
|
||||
aidl: "-Iframework/aidl",
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue