-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
53 lines (43 loc) · 1.21 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version '1.0-SNAPSHOT'
buildscript {
ext.kotlin_version = '1.2.41'
ext.botlin_version = '0.3.2'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
repositories {
mavenCentral()
maven { url 'https://dl.bintray.com/mizoguche/maven/' }
// For simple-slack-api
// if you don't need SlackEngine, remove this line
maven { url 'https://jitpack.io' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "info.mizoguche:botlin:$botlin_version"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task run(type: JavaExec) {
classpath = files("build/libs/${rootProject.name}-${version}.jar")
classpath += sourceSets.main.runtimeClasspath
main = 'botlin.MainKt'
dependsOn assemble
}
task stage(type: Jar, dependsOn: [clean, jar]) {
archiveName = "${rootProject.name}.jar"
manifest {
attributes 'Main-Class': 'botlin.MainKt'
}
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
from "$buildDir/classes/main"
}