-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
103 lines (80 loc) · 2.25 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
import org.gradle.internal.jvm.Jvm
plugins {
id 'java-library'
id 'maven-publish'
id 'com.github.sherter.google-java-format' version '0.8'
id 'jacoco'
id 'org.unbroken-dome.test-sets' version '2.1.1'
}
group 'com.github.agmcc'
version = '0.4.0'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
ext {
junitVersion = '5.4.2'
mockitoVersion = '2.28.2'
}
repositories {
mavenCentral()
}
testSets {
integrationTest
}
configurations {
integrationTestImplementation {
exclude group: 'org.junit.jupiter'
}
}
dependencies {
/* PRODUCTION */
api 'javax.inject:javax.inject:1'
implementation 'com.squareup:javapoet:1.11.1'
implementation 'com.google.guava:guava:28.0-jre'
/* UNIT TEST */
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junitVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.mockito:mockito-junit-jupiter:$mockitoVersion"
testImplementation 'org.assertj:assertj-core:3.13.2'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion"
/* INTEGRATION TEST */
integrationTestImplementation 'com.google.truth:truth:0.30'
integrationTestImplementation 'com.google.testing.compile:compile-testing:0.18'
integrationTestRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junitVersion"
// Needed for JDK 8
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
integrationTestImplementation files(Jvm.current().getToolsJar())
}
}
tasks.withType(Test) {
useJUnitPlatform()
testLogging {
events 'failed', 'standard_error'
exceptionFormat = 'full'
}
}
googleJavaFormat {
toolVersion = '1.7'
}
task format {
dependsOn ':googleJavaFormat'
group 'build'
description 'Google Java Format'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'swordfish'
}
}
}
jacocoTestReport {
dependsOn check
reports {
xml.enabled true
}
executionData = fileTree(buildDir).include("/jacoco/*.exec")
}
check.dependsOn integrationTest
integrationTest.mustRunAfter test