-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (81 loc) · 2.35 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
plugins {
id 'java'
id 'java-test-fixtures'
id 'jvm-test-suite'
id 'application'
id 'com.palantir.git-version' version '3.0.0'
id 'net.ltgt.errorprone' version '3.0.1'
}
group 'com.github.ianparkinson'
version gitVersion()
repositories {
mavenCentral()
}
dependencies {
errorprone 'com.google.errorprone:error_prone_core:2.18.0'
compileOnly 'com.google.errorprone:error_prone_core:2.18.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'info.picocli:picocli:4.7.1'
annotationProcessor 'info.picocli:picocli-codegen:4.7.1'
testFixturesImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testFixturesApi 'com.squareup.okhttp3:mockwebserver:4.10.0'
}
task copyLicense(type: Copy) {
group = "build"
description = "Copy legal docs into the build"
from layout.projectDirectory.file("LICENSE"), layout.projectDirectory.file("NOTICE")
into new File(sourceSets.main.output.resourcesDir, "META-INF")
}
compileJava {
sourceCompatibility = 11
targetCompatibility = 11
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
dependsOn(copyLicense)
}
testing {
suites {
configureEach {
useJUnitJupiter("5.9.2")
sourceCompatibility = 11
targetCompatibility = 11
dependencies {
implementation 'com.google.truth:truth:1.1.3'
}
}
integrationTest(JvmTestSuite) {
testType = TestSuiteType.INTEGRATION_TEST
dependencies {
implementation project.getDependencies().testFixtures(project)
implementation "org.junit.jupiter:junit-jupiter-params:5.9.2"
}
targets {
all {
testTask.configure {
systemProperty 'helog.expected.version', version
}
}
}
}
}
}
tasks.withType(JavaCompile).configureEach {
options.errorprone.enabled = true
}
application {
mainClass = 'com.github.ianparkinson.helog.Helog'
}
jar {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
)
}
}
check {
dependsOn integrationTest
}
integrationTest {
dependsOn installDist
shouldRunAfter test
}