-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
108 lines (93 loc) · 2.5 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
104
105
106
107
108
plugins {
id 'java'
id 'maven'
id 'eclipse'
id 'idea'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.8.1'
id 'org.scm4j.releaser.scm4j-releaser-gradle-plugin' version '0.2.0'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
group = 'org.scm4j'
sourceSets {
inv {
java {
srcDir 'src/inv/java'
}
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
configurations.all {
resolutionStrategy {
cacheDynamicVersionsFor 0, 'seconds'
cacheChangingModulesFor 0, 'seconds'
}
}
repositories {
maven { url "https://jitpack.io" }
mavenCentral()
}
test {
jvmArgs '-Xmx128m'
testLogging {
events "failed"
exceptionFormat "full"
}
}
dependencies {
testCompile 'com.github.stefanbirkner:system-rules:1.16.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.0.62-beta'
testCompile 'nl.jqno.equalsverifier:equalsverifier:2.3'
testCompile 'org.hamcrest:hamcrest-all:1.3'
compile 'com.google.guava:guava:23.0'
compile 'org.yaml:snakeyaml:1.18'
compile 'org.slf4j:slf4j-simple:1.7.21'
compile 'com.diogonunes:JCDP:2.0.3.1'
compileOnly 'org.projectlombok:lombok:1.16.18'
}
jar {
manifest.attributes (
'Specification-Title': project.name,
'Specification-Version': version,
'Implementation-Title': project.name,
'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})",
)
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task fatJar(type: Jar, dependsOn: classes) {
manifest.attributes (
'Specification-Title': project.name,
'Specification-Version': version,
'Implementation-Title': project.name,
'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})",
)
baseName = 'fat-' + project.name
from { sourceSets.main.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
exclude "META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task run (type: JavaExec, dependsOn: classes){
if(project.hasProperty('a')){
args(a.split(','))
}
description = "Test CLI"
main = "org.scm4j.releaser.cli.CLI"
classpath = sourceSets.main.runtimeClasspath
}
artifacts {
archives sourcesJar
archives javadocJar
}