Override javaVersion for Doclava when EXPERIMENTAL_USE_OPENJDK9=true

Test: N/A
Bug: 110786923
Change-Id: I6d1f808e97aad2fe3206f52c8fc93c87b61fdb64
This commit is contained in:
Nan Zhang 2018-06-25 13:00:25 -07:00
parent 297d9bceda
commit 7ca467854e

View file

@ -640,6 +640,12 @@ func (d *Droiddoc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
var bootClasspathArgs string
javaVersion := getJavaVersion(ctx, String(d.Javadoc.properties.Java_version), String(d.Javadoc.properties.Sdk_version))
// Doclava has problem with "-source 1.9", so override javaVersion when Doclava
// is running with EXPERIMENTAL_USE_OPENJDK9=true. And eventually Doclava will be
// replaced by Metalava.
if !Bool(d.properties.Metalava_enabled) {
javaVersion = "1.8"
}
if javaVersion == "1.9" {
if len(deps.bootClasspath) > 0 {
var systemModules classpath