forked from inforion/kopycat
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
108 lines (91 loc) · 3.96 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
plugins {
id 'org.jetbrains.kotlin.jvm' apply false
id 'maven-publish'
}
ext {
kotlin_extensions_version = "0.4.0"
}
subprojects {
if (childProjects.isEmpty()) {
beforeEvaluate {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
}
afterEvaluate {
tasks {
compileKotlin {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += ['-Xopt-in=kotlin.ExperimentalUnsignedTypes,kotlin.time.ExperimentalTime']
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs += ['-Xopt-in=kotlin.ExperimentalUnsignedTypes,kotlin.time.ExperimentalTime']
}
}
}
tasks.findAll { it instanceof Test }.each { task ->
task.jvmArgs += [
"-server",
"-Xms2G",
"-Xmx5G",
"-XX:MaxDirectMemorySize=2g",
"-XX:+UseParallelGC",
"-XX:SurvivorRatio=6",
"-XX:-UseGCOverheadLimit"]
task.testLogging {
events "passed", "skipped", "failed" //, "standardOut", "standardError"
showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
// showStandardStreams = false
}
}
if (tasks.findByName("sourcesJar") == null) {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
publishing {
publications {
"$name"(MavenPublication) {
groupId = group
artifactId = name
version = version
from components.kotlin
artifact tasks.sourcesJar
}
}
}
if (project.name != "proposal") {
dependencies {
implementation project(":common:proposal")
}
}
dependencies {
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib'
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect'
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-test'
implementation group: 'com.github.inforion.common', name: 'logging', version: kotlin_extensions_version
implementation group: 'com.github.inforion.common', name: 'extensions', version: kotlin_extensions_version
implementation group: 'com.github.inforion.common', name: 'concurrent', version: kotlin_extensions_version
implementation group: 'com.github.inforion.common', name: 'iobuffer', version: kotlin_extensions_version
implementation group: 'com.github.inforion.common', name: 'optional', version: kotlin_extensions_version
implementation group: 'joda-time', name: 'joda-time', version: '2.10.10'
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation group: 'org.jetbrains.kotlin', name: 'kotlin-test-junit'
// Enable use of the JUnitPlatform Runner within the IDE
testImplementation group: 'org.junit.platform', name: 'junit-platform-runner', version: '1.6.2'
testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.6.2'
}
}
}
}