File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ ext. vendor = { ->
2
+ // By specifying the vendor, we force us (and CI) to
3
+ // use that specific JDK version. If it is not locally
4
+ // available, Gradle will provision the toolchain, i.e.
5
+ // download it.
6
+ if (project. hasProperty(" javaLanguageVendor" )) {
7
+ return JvmVendorSpec . matching(project. property(' javaLanguageVendor' ))
8
+ } else {
9
+ return JvmVendorSpec . matching(" ADOPTIUM" )
10
+ }
11
+ }
12
+
13
+ ext. languageVersion = { ->
14
+ if (project. hasProperty(" javaLanguageVersion" )) {
15
+ return JavaLanguageVersion . of(project. property(' javaLanguageVersion' ))
16
+ } else {
17
+ return JavaLanguageVersion . of(11 )
18
+ }
19
+ }
20
+
21
+ allprojects {
22
+ plugins. withType(JavaPlugin ) {
23
+ java {
24
+ toolchain {
25
+ vendor = vendor()
26
+ languageVersion = languageVersion()
27
+ }
28
+ }
29
+ }
30
+ }
31
+
1
32
allprojects {
2
33
plugins. withType(JavaLibraryPlugin ) {
3
34
sourceCompatibility = JavaVersion . VERSION_11
You can’t perform that action at this time.
0 commit comments