@@ -125,10 +125,20 @@ allprojects {
125125 tasks. withType(JavaCompile ) {
126126 dependsOn(' :installGitHooks' )
127127 sourceCompatibility = 8
128- if (isJava8) {
129- // option --add-exports not allowed with target 1.8
130- targetCompatibility = 8
131- }
128+ targetCompatibility = 8
129+
130+ // When sourceCompatibilty is changed to 11, then the following will be required.
131+ // options.compilerArgs += [
132+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
133+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
134+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
135+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
136+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
137+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED",
138+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
139+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
140+ // "--add-exports", "jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
141+ // ]
132142 options. failOnError = true
133143 options. deprecation = true
134144 options. compilerArgs + = [
@@ -138,19 +148,7 @@ allprojects {
138148 " -Xlint:-options" ,
139149 " -Xlint" ,
140150 ]
141- if (! isJava8) {
142- options. compilerArgs + = [
143- " --add-exports" , " jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" ,
144- " --add-exports" , " jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" ,
145- " --add-exports" , " jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED" ,
146- " --add-exports" , " jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED" ,
147- " --add-exports" , " jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED" ,
148- " --add-exports" , " jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED" ,
149- " --add-exports" , " jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED" ,
150- " --add-exports" , " jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED" ,
151- " --add-exports" , " jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" ,
152- ]
153- }
151+
154152 options. encoding = ' UTF-8'
155153 options. fork = true
156154 if (isJava8) {
@@ -588,15 +586,7 @@ subprojects {
588586 tasks. withType(Test ) {
589587 if (! isJava8) {
590588 jvmArgs + = [
591- " --add-opens" , " jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED" ,
592- " --add-opens" , " jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED" ,
593- " --add-opens" , " jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED" ,
594- " --add-opens" , " jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED" ,
595- " --add-opens" , " jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED" ,
596- " --add-opens" , " jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED" ,
597- " --add-opens" , " jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED" ,
598- " --add-opens" , " jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED" ,
599- " --add-opens" , " jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" ,
589+ " --add-opens" , " jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED"
600590 ]
601591 }
602592
0 commit comments