blob: ec0d9397a17042a32359a3050afa993385d57adf [file] [log] [blame]
Colin Cross3e3e72d2017-06-22 17:20:19 -07001// Copyright 2017 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package config
16
17import (
18 "strings"
19
20 "android/soong/android"
21)
22
23func init() {
24 android.RegisterMakeVarsProvider(pctx, makeVarsProvider)
25}
26
27func makeVarsProvider(ctx android.MakeVarsContext) {
28 ctx.Strict("TARGET_DEFAULT_JAVA_LIBRARIES", strings.Join(DefaultLibraries, " "))
Colin Cross64162712017-08-08 13:17:59 -070029
30 ctx.Strict("DEFAULT_JAVA_LANGUAGE_VERSION", "${DefaultJavaVersion}")
31
32 ctx.Strict("ANDROID_JAVA_HOME", "${JavaHome}")
33 ctx.Strict("ANDROID_JAVA_TOOLCHAIN", "${JavaToolchain}")
34 ctx.Strict("JAVA", "${JavaCmd}")
35 ctx.Strict("JAVAC", "${JavacCmd}")
36 ctx.Strict("JAR", "${JarCmd}")
37 ctx.Strict("JAVADOC", "${JavadocCmd}")
38 ctx.Strict("COMMON_JDK_FLAGS", "${CommonJdkFlags}")
Colin Cross3e3e72d2017-06-22 17:20:19 -070039}