-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
40 lines (32 loc) · 943 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
plugins {
id 'java'
id 'application'
id 'com.github.ben-manes.versions' version '0.51.0'
}
defaultTasks 'run'
final def semverProcessor = 'net.thauvin.erik:semver:1.2.2-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}
dependencies {
annotationProcessor semverProcessor
implementation semverProcessor
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
mainClass = 'com.example.App'
}
tasks.withType(JavaCompile).configureEach {
options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
options.compilerArgs += ["-Asemver.project.dir=$projectDir"]
}
tasks.register("runExample", JavaExec) {
group = 'application'
classpath = sourceSets.main.runtimeClasspath
mainClass.set('com.example.Example')
}