Skip to content

Commit

Permalink
Disable warning around -source 7 -release 7 for java version checker
Browse files Browse the repository at this point in the history
The java version checker triggers some default warnings because it
targets java7:

```
> Task :distribution:tools:java-version-checker:compileJava FAILED
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
```

Suppress this warning explicitly for this module.

Signed-off-by: Robert Muir <rmuir@apache.org>
  • Loading branch information
rmuir committed Apr 29, 2021
1 parent 89478ea commit bc72cd3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions distribution/tools/java-version-checker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
apply plugin: 'opensearch.build'

targetCompatibility = JavaVersion.VERSION_1_7
// targetting very old java versions enables a warning by default on newer JDK: disable it.
compileJava.options.compilerArgs += '-Xlint:-options'

// java_version_checker do not depend on core so only JDK signatures should be checked
tasks.named('forbiddenApisMain').configure {
Expand Down

0 comments on commit bc72cd3

Please sign in to comment.