build.gradle.kts 584 B

1234567891011121314151617181920
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. // We cannot use otelJava { minJavaVersionSupported.set(JavaVersion.VERSION_1_9) } because compiler
  5. // will fail with -Xlint without providing an error message.
  6. // We cannot use "--release" javac option because that will forbid calling methods added in jdk 9.
  7. java {
  8. sourceCompatibility = JavaVersion.VERSION_1_8
  9. targetCompatibility = JavaVersion.VERSION_1_8
  10. toolchain {
  11. languageVersion.set(null as JavaLanguageVersion?)
  12. }
  13. }
  14. tasks {
  15. withType<JavaCompile>().configureEach {
  16. options.release.set(null as Int?)
  17. }
  18. }