forked from grpc/grpc-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
133 lines (121 loc) · 4.74 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
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
id 'org.jetbrains.kotlin.jvm' version'1.3.61' apply false
}
ext {
grpcVersion = '1.29.0' // CURRENT_GRPC_VERSION
protobufVersion = '3.11.0'
kotlinVersion = '1.3.61'
coroutinesVersion = '1.3.3'
googleauthVersion = '0.20.0'
}
subprojects {
apply plugin: 'java'
apply plugin: 'org.jetbrains.kotlin.jvm'
group = "io.grpc"
version = "0.1.4" // CURRENT_GRPC_KOTLIN_VERSION
repositories {
mavenCentral()
}
dependencies {
testImplementation "junit:junit:4.12"
}
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
plugins.withId("org.jetbrains.dokka") {
dokka {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/dokka"
configuration {
externalDocumentationLink {
url = new URL("http://grpc.github.io/grpc-java/javadoc/")
}
externalDocumentationLink {
url = new URL("http://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/")
}
perPackageOption {
prefix = "io.grpc.testing"
suppress = true
}
perPackageOption {
prefix = "io.grpc.kotlin.generator"
suppress = true
}
}
}
}
plugins.withId("maven-publish") {
publishing {
publications {
maven(MavenPublication) {
pom {
name = project.group + ":" + project.name
url = 'https://github.com/grpc/grpc-kotlin'
afterEvaluate {
// description is not available until evaluated.
description = project.description
}
scm {
connection = 'scm:git:https://github.com/grpc/grpc-kotlin.git'
developerConnection = 'scm:git:[email protected]:grpc/grpc-kotlin.git'
url = 'https://github.com/grpc/grpc-kotlin'
}
licenses {
license {
name = 'Apache 2.0'
url = 'https://opensource.org/licenses/Apache-2.0'
}
}
developers {
developer {
id = "grpc.io"
name = "gRPC Contributors"
email = "[email protected]"
url = "https://grpc.io/"
organization = "gRPC Authors"
organizationUrl = "https://www.google.com"
}
}
}
}
}
}
}
tasks.withType(Test) {
testLogging {
showStandardStreams = true
// set options for log level LIFECYCLE
events TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events TestLogEvent.STARTED,
TestLogEvent.FAILED,
TestLogEvent.PASSED,
TestLogEvent.SKIPPED,
TestLogEvent.STANDARD_ERROR,
TestLogEvent.STANDARD_OUT
exceptionFormat TestExceptionFormat.FULL
}
info.events = debug.events
info.exceptionFormat = debug.exceptionFormat
afterSuite { desc, result ->
if (!desc.parent) { // will match the outermost suite
def output = "Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped)"
def startItem = '| ', endItem = ' |'
def repeatLength = startItem.length() + output.length() + endItem.length()
println('\n' + ('-' * repeatLength) + '\n' + startItem + output + endItem + '\n' + ('-' * repeatLength))
}
}
}
}
}