-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
133 lines (114 loc) · 4.08 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
buildscript {
ext{
kotlin_version = '1.3.20'
ktor_version = '1.0.0-beta-3'
netty_version = '4.1.25.Final'
guava_version = '20.0'
protobuf_version = '3.5.1'
protoc_version = '3.5.1-1'
grpc_version = '1.18.0'
ktor_version = '1.0.1'
}
repositories {
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.20' apply false
id 'com.google.protobuf' version '0.8.8' apply false
}
version = '0.2-SNAPSHOT'
group = 'org.starcoin'
apply plugin: 'project-report'
subprojects {
buildscript {
repositories {
jcenter()
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'kotlin'
apply plugin: "org.jetbrains.kotlin.jvm"
apply plugin: 'kotlinx-serialization'
apply plugin: 'project-report'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
maven { url "https://dl.bintray.com/ethereum/maven/" }
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://jitpack.io" }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0'
compile "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0"
testCompile("org.junit.jupiter:junit-jupiter-engine:5.1.0")
testCompile("org.mockito:mockito-core:2.10.0")
testCompile("org.reflections:reflections:0.9.11")
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
task customClean(type: Delete) {
delete project.relativeProjectPath("database")
delete project.relativeProjectPath("logs")
//println(project.relativeProjectPath("database"))
}
clean.dependsOn customClean
tasks.withType(org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile).all {
kotlinOptions.freeCompilerArgs += ["-Xuse-experimental=kotlin.Experimental",
"-Xuse-experimental=kotlin.experimental.ExperimentalTypeInference",
"-Xuse-experimental=kotlin.ExperimentalMultiplatform",
"-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xuse-experimental=kotlinx.coroutines.ObsoleteCoroutinesApi",
"-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi",
"-progressive"]
}
test {
reports.html.enabled = false
maxHeapSize = "4096m"
maxParallelForks = 1
}
task unitTest(type: Test ) {
exclude '**/*IntegrationTest*'
reports.html.enabled = true
maxHeapSize = "2048m"
maxParallelForks = 1
jvmArgs "-XX:+UnlockExperimentalVMOptions"
}
task integrationTest(type: Test ) {
include '**/*IntegrationTest*'
reports.html.enabled = false
maxHeapSize = "2048m"
maxParallelForks = 1
}
}
task aggregateReports(){
doLast {
this.subprojects.each{ subProject ->
copy{
from "${subProject.buildDir}/reports"
into "$buildDir/reports/${subProject.name}"
}
}
}
}