32 lines
662 B
Groovy
32 lines
662 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'application'
|
|
id 'com.github.ben-manes.versions' version '0.38.0'
|
|
}
|
|
|
|
// ./gradlew run
|
|
// ./gradlew runExample
|
|
|
|
defaultTasks 'run'
|
|
|
|
final def semverProcessor = 'net.thauvin.erik:semver:1.2.0'
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
mainClassName = 'com.example.Example'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
annotationProcessor semverProcessor
|
|
implementation semverProcessor
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
|
|
options.compilerArgs += ["-Asemver.project.dir=${projectDir}/example"]
|
|
}
|