-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
62 lines (49 loc) · 1.63 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
import java.time.Instant
import java.time.ZoneId
import java.time.format.DateTimeFormatter
plugins {
id 'java'
}
group 'com.esaulpaugh'
version '1.1-SNAPSHOT'
archivesBaseName = "headlong-cli"
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava {
if (JavaVersion.current() >= JavaVersion.VERSION_1_10) {
options.compilerArgs.addAll(['--release', '8'])
}
options.encoding = "UTF-8"
}
repositories {
mavenCentral()
// mavenLocal()
}
final String headlongVersion = '12.3.3'
final String junitVersion = '5.10.3'
final DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("MMMM d yyyy", Locale.ENGLISH).withZone(ZoneId.of("UTC"))
task fatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'com.esaulpaugh.headlong.cli.Main',
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'headlong-Version': headlongVersion,
'Build-Date': dateFormatter.format(Instant.now())
}
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
with jar
}
dependencies {
// implementation files('libs/headlong-' + headlongVersion + '.jar')
implementation 'com.esaulpaugh:headlong:' + headlongVersion
implementation 'com.google.code.gson:gson:2.10.1'
test.useJUnitPlatform()
testImplementation "org.junit.jupiter:junit-jupiter-api:" + junitVersion
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:" + junitVersion
}
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
}