plugins { id 'java' id 'application' id 'com.github.ben-manes.versions' version '0.39.0' } // ./gradlew run // ./gradlew runExample defaultTasks 'run' final def semverProcessor = 'net.thauvin.erik:semver:1.2.1-SNAPSHOT' sourceCompatibility = 1.8 targetCompatibility = 1.8 mainClassName = 'com.example.App' repositories { mavenLocal() mavenCentral() } dependencies { annotationProcessor semverProcessor implementation semverProcessor } tasks.withType(JavaCompile) { options.annotationProcessorGeneratedSourcesDirectory = file("${projectDir}/src/generated/java") options.compilerArgs += [ "-Asemver.project.dir=$projectDir" ] } task runExample(type: JavaExec) { group = 'application' classpath = sourceSets.main.runtimeClasspath mainClass = 'com.example.Example' }