forked from veita/jaffre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
73 lines (55 loc) · 1.73 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
plugins {
id 'java-library'
id 'jacoco'
id 'maven-publish'
}
group = 'org.jaffre'
version = '1.0.0-SNAPSHOT'
description = 'jaffre'
ext.buildCommit = 'git describe --always --tags --dirty=-dirty'.execute().text.trim()
ext.buildTimestamp = java.time.format.DateTimeFormatter.ISO_INSTANT.format(java.time.Instant.now())
ext.buildJdk = "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})"
java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
mavenCentral()
}
dependencies {
api group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+'
api group: 'org.springframework', name: 'spring-core', version: '5.+'
api group: 'org.springframework', name: 'spring-context', version: '5.+'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.+'
testImplementation group: 'junit', name: 'junit', version: '4.+'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.+'
testRuntimeOnly group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.+'
}
jacocoTestReport {
reports {
xml.required = true
html.required = true
csv.required = false
}
}
jar {
manifest {
from('src/main/resources/META-INF/MANIFEST.MF')
attributes(
'Specification-Title': 'jaffre',
'Specification-Version': '1.0',
'Implementation-Title': project.name,
'Implementation-Version': archiveVersion.get(),
'Build-Revision': buildCommit,
'Build-Timestamp': buildTimestamp,
'Build-Jdk': buildJdk
)
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}