2017-06-23 08:20:19 +08:00
|
|
|
// Copyright 2017 Google Inc. All rights reserved.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
package config
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
"android/soong/android"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
android.RegisterMakeVarsProvider(pctx, makeVarsProvider)
|
|
|
|
}
|
|
|
|
|
|
|
|
func makeVarsProvider(ctx android.MakeVarsContext) {
|
2020-07-01 17:48:14 +08:00
|
|
|
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)
|
2017-08-09 04:17:59 +08:00
|
|
|
|
|
|
|
ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}")
|
2017-12-09 02:03:43 +08:00
|
|
|
ctx.Strict("ANDROID_JAVA8_HOME", "prebuilts/jdk/jdk8/${hostPrebuiltTag}")
|
|
|
|
ctx.Strict("ANDROID_JAVA9_HOME", "prebuilts/jdk/jdk9/${hostPrebuiltTag}")
|
2019-10-10 00:10:08 +08:00
|
|
|
ctx.Strict("ANDROID_JAVA11_HOME", "prebuilts/jdk/jdk11/${hostPrebuiltTag}")
|
2017-08-09 04:17:59 +08:00
|
|
|
ctx.Strict("ANDROID_JAVA_TOOLCHAIN", "${JavaToolchain}")
|
2019-06-12 04:30:13 +08:00
|
|
|
ctx.Strict("JAVA", "${JavaCmd} ${JavaVmFlags}")
|
|
|
|
ctx.Strict("JAVAC", "${JavacCmd} ${JavacVmFlags}")
|
2017-08-09 04:17:59 +08:00
|
|
|
ctx.Strict("JAR", "${JarCmd}")
|
2017-08-16 05:27:52 +08:00
|
|
|
ctx.Strict("JAR_ARGS", "${JarArgsCmd}")
|
2017-08-09 04:17:59 +08:00
|
|
|
ctx.Strict("JAVADOC", "${JavadocCmd}")
|
|
|
|
ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
|
2017-12-01 07:50:39 +08:00
|
|
|
|
2018-06-07 05:46:32 +08:00
|
|
|
ctx.Strict("DX", "${D8Cmd}")
|
|
|
|
ctx.Strict("DX_COMMAND", "${D8Cmd} -JXms16M -JXmx2048M")
|
2017-12-29 04:23:20 +08:00
|
|
|
ctx.Strict("R8_COMPAT_PROGUARD", "${R8Cmd}")
|
2017-12-01 07:50:39 +08:00
|
|
|
|
2017-10-20 04:06:22 +08:00
|
|
|
ctx.Strict("TURBINE", "${TurbineJar}")
|
2017-08-15 05:17:37 +08:00
|
|
|
|
2018-06-20 13:47:35 +08:00
|
|
|
if ctx.Config().RunErrorProne() {
|
|
|
|
ctx.Strict("ERROR_PRONE_JARS", strings.Join(ErrorProneClasspath, " "))
|
|
|
|
ctx.Strict("ERROR_PRONE_FLAGS", "${ErrorProneFlags}")
|
|
|
|
ctx.Strict("ERROR_PRONE_CHECKS", "${ErrorProneChecks}")
|
2017-08-15 05:17:37 +08:00
|
|
|
}
|
2017-08-31 23:08:39 +08:00
|
|
|
|
2019-06-12 04:30:13 +08:00
|
|
|
ctx.Strict("TARGET_JAVAC", "${JavacCmd} ${JavacVmFlags} ${CommonJdkFlags}")
|
|
|
|
ctx.Strict("HOST_JAVAC", "${JavacCmd} ${JavacVmFlags} ${CommonJdkFlags}")
|
2018-06-20 13:47:35 +08:00
|
|
|
|
2018-06-20 13:49:39 +08:00
|
|
|
ctx.Strict("JLINK", "${JlinkCmd}")
|
|
|
|
ctx.Strict("JMOD", "${JmodCmd}")
|
2017-10-18 04:56:52 +08:00
|
|
|
|
|
|
|
ctx.Strict("SOONG_JAVAC_WRAPPER", "${SoongJavacWrapper}")
|
2018-11-13 02:13:39 +08:00
|
|
|
ctx.Strict("DEXPREOPT_GEN", "${DexpreoptGen}")
|
2018-03-16 07:24:10 +08:00
|
|
|
ctx.Strict("ZIPSYNC", "${ZipSyncCmd}")
|
2017-11-23 05:49:43 +08:00
|
|
|
|
|
|
|
ctx.Strict("JACOCO_CLI_JAR", "${JacocoCLIJar}")
|
2020-06-25 04:36:59 +08:00
|
|
|
ctx.Strict("DEFAULT_JACOCO_EXCLUDE_FILTER", strings.Join(DefaultMakeJacocoExcludeFilter, ","))
|
2018-05-03 03:58:28 +08:00
|
|
|
|
|
|
|
ctx.Strict("EXTRACT_JAR_PACKAGES", "${ExtractJarPackagesCmd}")
|
2018-06-08 07:46:02 +08:00
|
|
|
|
2019-05-21 04:14:18 +08:00
|
|
|
ctx.Strict("MANIFEST_CHECK", "${ManifestCheckCmd}")
|
2018-06-08 07:46:02 +08:00
|
|
|
ctx.Strict("MANIFEST_FIXER", "${ManifestFixerCmd}")
|
2018-05-25 07:11:20 +08:00
|
|
|
|
2019-02-27 14:14:04 +08:00
|
|
|
ctx.Strict("ANDROID_MANIFEST_MERGER", "${ManifestMergerCmd}")
|
2019-01-17 07:15:52 +08:00
|
|
|
|
2020-08-12 23:48:23 +08:00
|
|
|
ctx.Strict("CLASS2NONSDKLIST", "${Class2NonSdkList}")
|
2019-01-17 07:15:52 +08:00
|
|
|
ctx.Strict("HIDDENAPI", "${HiddenAPI}")
|
2019-02-22 06:58:58 +08:00
|
|
|
|
|
|
|
ctx.Strict("DEX_FLAGS", "${DexFlags}")
|
2019-08-09 03:56:34 +08:00
|
|
|
|
|
|
|
ctx.Strict("AIDL", "${AidlCmd}")
|
|
|
|
ctx.Strict("AAPT2", "${Aapt2Cmd}")
|
|
|
|
ctx.Strict("ZIPALIGN", "${ZipAlign}")
|
|
|
|
ctx.Strict("SIGNAPK_JAR", "${SignapkCmd}")
|
|
|
|
ctx.Strict("SIGNAPK_JNI_LIBRARY_PATH", "${SignapkJniLibrary}")
|
|
|
|
|
|
|
|
ctx.Strict("SOONG_ZIP", "${SoongZipCmd}")
|
|
|
|
ctx.Strict("MERGE_ZIPS", "${MergeZipsCmd}")
|
|
|
|
ctx.Strict("ZIP2ZIP", "${Zip2ZipCmd}")
|
|
|
|
|
|
|
|
ctx.Strict("ZIPTIME", "${Ziptime}")
|
|
|
|
|
2017-06-23 08:20:19 +08:00
|
|
|
}
|