41 lines
773 B
Groovy
41 lines
773 B
Groovy
buildscript {
|
|
ext.kotlin_version = '1.1.51'
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'application'
|
|
|
|
// ./gradlew
|
|
// ./gradlew runJava
|
|
|
|
defaultTasks 'run'
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
def processorJar = "net.thauvin.erik:semver:1.0.1"
|
|
|
|
mainClassName = 'com.example.Main'
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
kapt processorJar
|
|
compileOnly processorJar
|
|
|
|
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
}
|
|
|
|
task(runJava, type: JavaExec) {
|
|
main 'com.example.Example'
|
|
classpath sourceSets.main.runtimeClasspath
|
|
}
|