-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
61 lines (50 loc) · 1.36 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
54
55
56
57
58
59
60
61
buildscript {
ext.kotlin_version = '1.1.3'
ext.vertx_version = '3.4.2'
ext.application_name = 'Gradle Kotlin Vert.x demo project'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin'
apply plugin: 'application'
mainClassName = 'alphabetapeter.MainKt'
defaultTasks 'run'
repositories {
mavenCentral()
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
kotlinOptions {
jvmTarget = "1.8"
}
}
task getHomeDir() {
println gradle.gradleHomeDir
}
task buildJar(type: Jar) {
manifest {
attributes 'Implementation-Title': "$application_name",
'Implementation-Version': '1',
'Main-Class': 'alphabetapeter.MainKt'
}
baseName = 'application'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task stage(dependsOn: ['buildJar', 'clean'])
buildJar.mustRunAfter clean
task wrapper(type: Wrapper) {
gradleVersion = "4.2"
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "io.vertx:vertx-core:$vertx_version"
compile "io.vertx:vertx-web:$vertx_version"
testCompile 'junit:junit:4.11'
testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
}