Skip to content

Commit d3a1cfd

Browse files
committed
download jdk if not available (should fix gh pipeline for early access)
1 parent 153c0b3 commit d3a1cfd

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

build.gradle

+10-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ plugins {
33
id "net.ltgt.errorprone" version "3.1.0"
44
id "java"
55
id "idea"
6+
id "application"
67
id "com.vanniktech.dependency.graph.generator" version "0.8.0"
78
id("com.diffplug.spotless") version "6.25.0"
89
// id "com.libyear.libyear-gradle-plugin" version "0.1.6"
10+
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0'
911
}
1012

1113
java {
@@ -115,15 +117,15 @@ jar {
115117
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
116118
}
117119

118-
task copyDependenciesToLibs(type: Copy) {
120+
tasks.register('copyDependenciesToLibs', Copy) {
119121
into "libs"
120122
from configurations.compileClasspath
121123
}
122124

123125
tasks.withType(JavaCompile) {
124126
options.encoding = 'UTF-8'
125127
//options.compilerArgs.add("-Xlint:all")
126-
// options.compilerArgs.add("--enable-preview")
128+
options.compilerArgs.add("--enable-preview")
127129

128130
options.incremental = true
129131

@@ -137,6 +139,11 @@ tasks.withType(JavaCompile) {
137139
}
138140
}
139141

142+
// application and main class definition
143+
application {
144+
mainClassName = 'lars.Main'
145+
}
146+
140147

141148
test {
142149
useJUnitPlatform()
@@ -145,7 +152,7 @@ test {
145152
exceptionFormat "full"
146153
}
147154
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
148-
// jvmArgs("--enable-preview")
155+
jvmArgs("--enable-preview")
149156
}
150157

151158
dependencyUpdates.resolutionStrategy {

0 commit comments

Comments
 (0)