Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1c40db7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Revert "Pin javadoc to JDK 11""

parents 37368d54 4ad3dc66
Loading
Loading
Loading
Loading
+2 −35
Original line number Diff line number Diff line
@@ -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
@@ -136,12 +132,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")
@@ -268,7 +263,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 {
@@ -282,17 +277,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 {
@@ -301,14 +285,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 {
@@ -317,12 +293,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"))
	})
}