-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
81 lines (69 loc) · 2.05 KB
/
build.gradle
File metadata and controls
81 lines (69 loc) · 2.05 KB
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
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java-library'
id 'maven-publish'
id 'jacoco'
id("net.razvan.jacoco-to-cobertura") version "1.3.2"
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'org.reflections:reflections:0.10.2'
implementation 'org.yaml:snakeyaml:2.4'
implementation group: 'com.google.guava', name: 'guava', version: '33.4.8-android'
testImplementation platform('org.junit:junit-bom:5.12.2')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testImplementation 'org.mockito:mockito-core:5.17.0'
testImplementation "ch.qos.logback:logback-classic:1.3.15"
testImplementation 'org.codehaus.groovy:groovy:2.5.22'
}
group = 'com.github.hayarobi'
version = '0.7.1'
description = 'Simple Configuration'
java {
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
test {
finalizedBy jacocoTestReport // report is always generated after tests run
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
reports {
xml.required = true
xml.outputLocation = layout.buildDirectory.file('reports/xml/jacocoTestReport.xml')
csv.required = false
}
}
tasks.register('reportToCobertura') {
dependsOn 'jacocoTestReport'
dependsOn 'jacocoToCobertura'
doLast {
print "making cobertura report"
}
}
publishing {
publications {
create("mavenJava", MavenPublication) {
// java 컴포넌트를 등록
from components.java
}
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
jacocoToCobertura {
inputFile.set(layout.buildDirectory.file("reports/xml/jacocoTestReport.xml"))
outputFile.set(layout.buildDirectory.file("reports/xml/cobertura.xml"))
}
tasks.test {
useJUnitPlatform() // JUnit 5 플랫폼 사용
}