@@ -3,9 +3,11 @@ plugins {
3
3
id " net.ltgt.errorprone" version " 3.1.0"
4
4
id " java"
5
5
id " idea"
6
+ id " application"
6
7
id " com.vanniktech.dependency.graph.generator" version " 0.8.0"
7
8
id(" com.diffplug.spotless" ) version " 6.25.0"
8
9
// id "com.libyear.libyear-gradle-plugin" version "0.1.6"
10
+ id ' org.gradle.toolchains.foojay-resolver-convention' version ' 0.8.0'
9
11
}
10
12
11
13
java {
@@ -115,15 +117,15 @@ jar {
115
117
duplicatesStrategy(DuplicatesStrategy . EXCLUDE )
116
118
}
117
119
118
- task copyDependenciesToLibs ( type : Copy ) {
120
+ tasks . register( ' copyDependenciesToLibs ' , Copy ) {
119
121
into " libs"
120
122
from configurations. compileClasspath
121
123
}
122
124
123
125
tasks. withType(JavaCompile ) {
124
126
options. encoding = ' UTF-8'
125
127
// options.compilerArgs.add("-Xlint:all")
126
- // options.compilerArgs.add("--enable-preview")
128
+ options. compilerArgs. add(" --enable-preview" )
127
129
128
130
options. incremental = true
129
131
@@ -137,6 +139,11 @@ tasks.withType(JavaCompile) {
137
139
}
138
140
}
139
141
142
+ // application and main class definition
143
+ application {
144
+ mainClassName = ' lars.Main'
145
+ }
146
+
140
147
141
148
test {
142
149
useJUnitPlatform()
@@ -145,7 +152,7 @@ test {
145
152
exceptionFormat " full"
146
153
}
147
154
maxParallelForks = Runtime . runtime. availableProcessors(). intdiv(2 ) ?: 1
148
- // jvmArgs("--enable-preview")
155
+ jvmArgs(" --enable-preview" )
149
156
}
150
157
151
158
dependencyUpdates. resolutionStrategy {
0 commit comments