-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
134 lines (112 loc) · 4.23 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//_ _ _
//| | ___ __ ___ | |_ _ __ ___ _ _ _ __ _ __(_)
//| |/ / '_ \ / _ \| __| '_ \ / _ \| | | | '__| '__| |
//| <| |_) | (_) | |_| |_) | (_) | |_| | | | | | |
//|_|\_\ .__/ \___/ \__| .__/ \___/ \__,_|_| |_| |_|
//|_| |_|
// ./gradlew install -Dkpotpourri.version=1.X-SNAPSHOT
buildscript {
ext.myVersion = System.getProperty("kpotpourri.version", "SNAPSHOT")
apply from: "$rootDir/gradle/dependency_versions.gradle"
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://dl.bintray.com/kotlin/kotlin-eap/" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin"
classpath "org.jetbrains.kotlin:kotlin-noarg:$version_kotlin"
classpath "org.jetbrains.kotlin:kotlin-allopen:$version_kotlin"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$version_bintray"
// classpath "com.autoscout24.gradle:gradle-todo-plugin:$version_todo"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:$version_coveralls"
classpath "org.standardout:gradle-versioneye-plugin:$version_versioneye"
}
}
apply plugin: 'org.standardout.versioneye'
versioneye {
includeSubProjects = true
}
allprojects {
group = 'com.github.christophpickl.kpotpourri'
version = myVersion
repositories {
jcenter()
mavenCentral()
}
// https://discuss.gradle.org/t/travis-ci-org-gradle-launcher-daemon-client-daemondisappearedexception-gradle-build-daemon-disappeared-unexpectedly-it-may-have-been-killed-or-may-have-crashed/13106/3
if (System.env.TRAVIS == 'true') {
tasks.withType(GroovyCompile) {
groovyOptions.fork = false
}
tasks.withType(Test) {
// containers (currently) have 2 dedicated cores and 4GB of memory
maxParallelForks = 1
minHeapSize = '128m'
}
}
}
subprojects { subproject ->
apply plugin: "kotlin"
apply plugin: "kotlin-noarg"
apply plugin: "java"
// apply plugin: "com.autoscout24.gradle.todo"
apply from: "$rootDir/gradle/test.gradle"
apply from: "$rootDir/gradle/publishing.gradle"
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
compile "org.jetbrains.kotlin:kotlin-reflect"
compile "io.github.microutils:kotlin-logging:" + version_kotlin_logging
runtime "org.slf4j:jcl-over-slf4j:" + version_jcl
if (subproject.name != "test4k") {
testCompile project(':test4k')
}
testRuntime "ch.qos.logback:logback-classic:" + version_logback
}
sourceCompatibility = versionJava
targetCompatibility = versionJava
compileKotlin {
kotlinOptions.jvmTarget = versionJava.toString()
}
compileTestKotlin {
kotlinOptions.jvmTarget = versionJava.toString()
}
noArg {
annotation("com.github.christophpickl.kpotpourri.common.KotlinNoArg")
}
// some weird error saying something about "org/apache/commons/io/FilenameUtils" ?!?
// todo {
// todoPattern = "//[\\t\\s]*(FIXME|TODO) (.*)"
// failIfFound = true
// sourceFolder = "${subproject.name}/src" // in order to look into main and test folders
// fileExtensions = ["kt"]
// }
// execute "gradle listDependencies" on root project, dumps dependencies for all submodules (hack needed in gradle)
task listDependencies(type: DependencyReportTask) {}
jar {
manifest {
attributes 'Implementation-Title': 'kpotpourri - ${name}',
'Implementation-Vendor': 'Christoph Pickl',
'Implementation-Version': myVersion
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task testJar(type: Jar) {
classifier = 'tests'
from sourceSets.test.output
}
task testSourcesJar(type: Jar, dependsOn: classes) {
classifier = 'testSources'
from sourceSets.test.allSource
}
artifacts {
archives sourcesJar
archives testJar
archives testSourcesJar
}
}