-
Notifications
You must be signed in to change notification settings - Fork 29
/
build.gradle
134 lines (115 loc) · 4.47 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
buildscript {
ext {
bintrayUser = project.hasProperty('bintrayUser') ?
project.property('bintrayUser') : System.getenv('BINTRAY_USER')
bintrayApiKey = project.hasProperty('bintrayApiKey') ?
project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
}
repositories {
jcenter()
mavenCentral()
}
}
plugins{
id 'com.google.protobuf' version '0.8.6' apply false
id 'org.jetbrains.kotlin.jvm' version '1.3.61' apply false
id "com.jfrog.bintray" version "1.8.4" apply false
id "com.jfrog.artifactory" version "4.8.1" apply false
id "org.springframework.boot" version "2.0.3.RELEASE" apply false
id 'com.gradle.plugin-publish' version '0.9.7' apply false
id "com.google.osdetector" version "1.4.0"
}
subprojects{ subproject ->
repositories {
jcenter()
mavenCentral()
maven { url "https://dl.bintray.com/marcoferrer/kroto-plus/" }
maven { url 'http://dl.bintray.com/kotlin/kotlin-eap' }
}
apply plugin: 'idea'
group = 'com.github.marcoferrer.krotoplus'
version = '0.6.1'
if(!subproject.path.contains("test-api")){
apply plugin: 'kotlin'
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
}
}else{
apply plugin: 'java'
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '[4,)'
}
tasks.withType(Test) {
testLogging {
// set options for log level LIFECYCLE
events (
'FAILED',
'PASSED',
'SKIPPED',
'STANDARD_OUT'
)
exceptionFormat 'FULL'
showExceptions true
showCauses true
showStackTraces true
// set options for log level DEBUG and INFO
debug {
events(
'STARTED',
'FAILED',
'PASSED',
'SKIPPED',
'STANDARD_ERROR',
'STANDARD_OUT'
)
exceptionFormat '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))
}
}
}
}
subproject.ext{
localPluginPath = [
"kroto": "${rootProject.projectDir}/protoc-gen-kroto-plus/build/libs/protoc-gen-kroto-plus-${project.version}-${osdetector.classifier}.exe",
"coroutines": "${rootProject.projectDir}/protoc-gen-grpc-coroutines/build/libs/protoc-gen-grpc-coroutines-${project.version}-${osdetector.classifier}.exe"
]
configProtoTaskWithKroto = { task, krotoConfig ->
task.inputs.files krotoConfig
task.dependsOn ':protoc-gen-kroto-plus:buildCanteenArtifacts'
task.plugins {
kroto {
outputSubDir = "java"
if(osdetector.os == "windows") {
// We want to relativize the configuration path
// because absolute paths cause issues in windows
// environments
option "ConfigPath=${krotoConfig.absolutePath.replace(System.getProperty("user.dir"), "").drop(1)}"
} else {
option "ConfigPath=$krotoConfig"
}
}
}
}
}
}