-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathbuild.gradle
130 lines (106 loc) · 3.88 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
/*
* Copyright 2019 namjug-kim
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
apply plugin: 'java'
group 'com.njkimg.reactive-crypto'
version '0.3.1'
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.jitpack:gradle-simple:1.1'
}
allprojects {
version '0.3.1'
apply plugin: 'jacoco'
}
subprojects {
group 'com.njkimg.reactive-crypto'
ext {
reactorVersion = '3.4.5'
kotlinJvmVersion = '1.3.21'
log4j2Version = '2.12.0'
slf4jVersion = '1.7.26'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
// kotlin plugin
classpath group: 'org.jetbrains.kotlin', name: 'kotlin-gradle-plugin', version: '1.3.50'
}
}
apply plugin: 'java'
repositories {
mavenCentral()
jcenter()
}
configurations {
ktlint
}
dependencies {
ktlint "com.pinterest:ktlint:0.33.0"
// common
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
// reactor
implementation group: 'io.projectreactor', name: 'reactor-core', version: "${reactorVersion}"
implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: '1.3.61'
// logging
implementation group: 'io.github.microutils', name: 'kotlin-logging', version: '1.7.6'
implementation group: 'org.slf4j', name: 'slf4j-api', version: "${slf4jVersion}"
compile group: 'io.projectreactor.kotlin', name: 'reactor-kotlin-extensions', version: '1.0.2.RELEASE'
// test
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.17.1'
testCompile group: 'io.projectreactor', name: 'reactor-test', version: "${reactorVersion}"
testRuntimeOnly group: 'org.apache.logging.log4j', name: 'log4j-api', version: "${log4j2Version}"
testRuntimeOnly group: 'org.apache.logging.log4j', name: 'log4j-core', version: "${log4j2Version}"
testRuntimeOnly group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: "${log4j2Version}"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
// to generate report in checkstyle format prepend following args:
// "--reporter=plain", "--reporter=checkstyle,output=${buildDir}/ktlint.xml"
// see https://github.com/pinterest/ktlint#usage for more
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.destination file("${buildDir}/reports/jacoco/report.xml")
xml.enabled true
html.enabled true
csv.enabled false
}
}
codeCoverageReport.dependsOn {
subprojects*.test
}