-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
70 lines (60 loc) · 1.6 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
62
63
64
65
66
67
68
69
70
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
subprojects {
apply plugin: 'eclipse'
apply plugin: 'kotlin'
apply plugin: 'jacoco'
eclipse.project.name = rootProject.name + '-' + project.name
// TODO set up detekt
repositories {
mavenCentral()
jcenter()
}
sourceCompatibility = '1.8'
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile 'io.vertx:vertx-core:3.5.0'
compile 'io.vertx:vertx-web:3.5.0'
// testCompile 'io.vertx:vertx-unit:3.5.0'
testCompile 'io.vertx:vertx-lang-kotlin-coroutines:3.5.0'
testCompile 'junit:junit:4.12'
testCompile 'net.wuerl.kotlin:assertj-core-kotlin:0.2.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}
jacoco {
toolVersion = '0.7.9'
// reportsDir = file("$buildDir/customJacocoReportDir")
}
jacocoTestReport {
reports {
xml.enabled true
// html.enabled false
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
}
task('setVersionFromBuild') << {
def buildNumber = System.getenv('BUILD_NUMBER')
if (buildNumber) {
def newVersion = version.replace('-SNAPSHOT', ".$buildNumber")
logger.quiet "Setting version to $newVersion"
ant.propertyfile(file: 'gradle.properties', comment: 'Edited by setVersionFromBuild') {
entry(key: 'version', value: newVersion)
}
} else {
logger.warn 'No BUILD_NUMBER. Skipping.'
}
}