diff --git a/java/config/config.go b/java/config/config.go index b026d73cf..422f86002 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -124,10 +124,6 @@ func init() { // This is set up and guaranteed by soong_ui return ctx.Config().Getenv("ANDROID_JAVA_HOME") }) - pctx.VariableFunc("Java11Home", func(ctx android.PackageVarContext) string { - // This is set up and guaranteed by soong_ui - return ctx.Config().Getenv("ANDROID_JAVA11_HOME") - }) pctx.VariableFunc("JlinkVersion", func(ctx android.PackageVarContext) string { if override := ctx.Config().Getenv("OVERRIDE_JLINK_VERSION_NUMBER"); override != "" { return override @@ -141,12 +137,11 @@ func init() { }) pctx.SourcePathVariable("JavaToolchain", "${JavaHome}/bin") - pctx.SourcePathVariable("Java11Toolchain", "${Java11Home}/bin") pctx.SourcePathVariableWithEnvOverride("JavacCmd", "${JavaToolchain}/javac", "ALTERNATE_JAVAC") pctx.SourcePathVariable("JavaCmd", "${JavaToolchain}/java") pctx.SourcePathVariable("JarCmd", "${JavaToolchain}/jar") - pctx.SourcePathVariable("JavadocCmd", "${Java11Toolchain}/javadoc") + pctx.SourcePathVariable("JavadocCmd", "${JavaToolchain}/javadoc") pctx.SourcePathVariable("JlinkCmd", "${JavaToolchain}/jlink") pctx.SourcePathVariable("JmodCmd", "${JavaToolchain}/jmod") pctx.SourcePathVariable("JrtFsJar", "${JavaHome}/lib/jrt-fs.jar") @@ -272,7 +267,7 @@ func JavaCmd(ctx android.PathContext) android.SourcePath { // JavadocCmd returns a SourcePath object with the path to the java command. func JavadocCmd(ctx android.PathContext) android.SourcePath { - return java11Tool(ctx, "javadoc") + return javaTool(ctx, "javadoc") } func javaTool(ctx android.PathContext, tool string) android.SourcePath { @@ -286,17 +281,6 @@ func javaTool(ctx android.PathContext, tool string) android.SourcePath { } -func java11Tool(ctx android.PathContext, tool string) android.SourcePath { - type javaToolKey string - - key := android.NewCustomOnceKey(javaToolKey(tool)) - - return ctx.Config().OnceSourcePath(key, func() android.SourcePath { - return java11Toolchain(ctx).Join(ctx, tool) - }) - -} - var javaToolchainKey = android.NewOnceKey("javaToolchain") func javaToolchain(ctx android.PathContext) android.SourcePath { @@ -305,14 +289,6 @@ func javaToolchain(ctx android.PathContext) android.SourcePath { }) } -var java11ToolchainKey = android.NewOnceKey("java11Toolchain") - -func java11Toolchain(ctx android.PathContext) android.SourcePath { - return ctx.Config().OnceSourcePath(java11ToolchainKey, func() android.SourcePath { - return java11Home(ctx).Join(ctx, "bin") - }) -} - var javaHomeKey = android.NewOnceKey("javaHome") func javaHome(ctx android.PathContext) android.SourcePath { @@ -321,12 +297,3 @@ func javaHome(ctx android.PathContext) android.SourcePath { return android.PathForSource(ctx, ctx.Config().Getenv("ANDROID_JAVA_HOME")) }) } - -var java11HomeKey = android.NewOnceKey("java11Home") - -func java11Home(ctx android.PathContext) android.SourcePath { - return ctx.Config().OnceSourcePath(java11HomeKey, func() android.SourcePath { - // This is set up and guaranteed by soong_ui - return android.PathForSource(ctx, ctx.Config().Getenv("ANDROID_JAVA11_HOME")) - }) -}