ソースを参照

Set source version for javadoc task (#11209)

Lauri Tulmin 10 ヶ月 前
コミット
8ffecc9cfc

+ 5 - 0
conventions/src/main/kotlin/otel.java-conventions.gradle.kts

@@ -99,6 +99,11 @@ afterEvaluate {
     sourceCompatibility = otelJava.minJavaVersionSupported.get().majorVersion
     targetCompatibility = otelJava.minJavaVersionSupported.get().majorVersion
   }
+  tasks.withType<Javadoc>().configureEach {
+    with(options) {
+      source = otelJava.minJavaVersionSupported.get().majorVersion
+    }
+  }
 }
 
 evaluationDependsOn(":dependencyManagement")

+ 5 - 0
custom-checks/build.gradle.kts

@@ -60,6 +60,11 @@ tasks.withType<Test>().configureEach {
   jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
 }
 
+tasks.withType<Javadoc>().configureEach {
+  // using com.sun.tools.javac.api.JavacTrees breaks javadoc generation
+  enabled = false
+}
+
 // Our conventions apply this project as a dependency in the errorprone configuration, which would cause
 // a circular dependency if trying to compile this project with that still there. So we filter this
 // project out.