mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Use full profile on JDK 10 builds
JDK 10 has gone fully-modular. This means that: - when targeting JDK 8 with a JDK 10 compiler, we have to use the full profile - when targeting JDK 10 with a JDK 10 compiler, we have to use -add-modules java.base Today we only target JDK 8 (our minimum compatibility version) so we need to change the compiler flags conditional on using a JDK 10 compiler. This commit does that. Relates #27884
This commit is contained in:
parent
c8371fa0b4
commit
8bd7a19d61
@ -408,7 +408,11 @@ class BuildPlugin implements Plugin<Project> {
|
|||||||
|
|
||||||
/** Adds compiler settings to the project */
|
/** Adds compiler settings to the project */
|
||||||
static void configureCompile(Project project) {
|
static void configureCompile(Project project) {
|
||||||
project.ext.compactProfile = 'compact3'
|
if (project.javaVersion < JavaVersion.VERSION_1_10) {
|
||||||
|
project.ext.compactProfile = 'compact3'
|
||||||
|
} else {
|
||||||
|
project.ext.compactProfile = 'full'
|
||||||
|
}
|
||||||
project.afterEvaluate {
|
project.afterEvaluate {
|
||||||
project.tasks.withType(JavaCompile) {
|
project.tasks.withType(JavaCompile) {
|
||||||
File gradleJavaHome = Jvm.current().javaHome
|
File gradleJavaHome = Jvm.current().javaHome
|
||||||
|
Loading…
x
Reference in New Issue
Block a user