40 lines
889 B
Groovy
40 lines
889 B
Groovy
buildscript {
|
|
ext.kotlin_version = '1.8.10'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
group 'com.rabbitmq'
|
|
version '1.0-SNAPSHOT'
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
implementation "com.rabbitmq:amqp-client:latest.release"
|
|
implementation "org.slf4j:slf4j-simple:1.7.25"
|
|
}
|
|
|
|
compileKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
compileTestKotlin {
|
|
kotlinOptions.jvmTarget = "1.8"
|
|
}
|
|
|
|
task run(type: JavaExec, dependsOn: classes) {
|
|
if ("$argv".trim().size() > 0)
|
|
args = "$argv".split(",").toList()
|
|
if ("$main".trim().size() > 0)
|
|
main = "${project.getProperty('main')}Kt"
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
} |