Add bld example
This commit is contained in:
parent
0ec7a6ee13
commit
11a47e7e0b
64 changed files with 425 additions and 54 deletions
39
examples/java/gradle/build.gradle
Normal file
39
examples/java/gradle/build.gradle
Normal file
|
@ -0,0 +1,39 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
id 'com.github.ben-manes.versions' version '0.47.0'
|
||||
}
|
||||
|
||||
// ./gradlew run
|
||||
// ./gradlew runExample
|
||||
|
||||
defaultTasks 'run'
|
||||
|
||||
final def semverProcessor = 'net.thauvin.erik:semver:1.2.1-SNAPSHOT'
|
||||
|
||||
sourceCompatibility = 17
|
||||
targetCompatibility = 17
|
||||
|
||||
mainClassName = 'com.example.App'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor semverProcessor
|
||||
implementation semverProcessor
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.generatedSourceOutputDirectory.set(file("${projectDir}/src/generated/java"))
|
||||
options.compilerArgs += ["-Asemver.project.dir=$projectDir"]
|
||||
}
|
||||
|
||||
task runExample(type: JavaExec) {
|
||||
group = 'application'
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
mainClass.set('com.example.Example')
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue