forked from riselabs-ufba/cotonet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (47 loc) · 1.76 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
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
group = 'br.com.riselabs'
version = '1.0'
description = """cotonet"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
maven { url "https://repo.eclipse.org/content/groups/releases/" }
maven { url "http://repo.maven.apache.org/maven2" }
}
dependencies {
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version:'4.3.0.201604071810-r'
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.archive', version:'4.3.0.201604071810-r'
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'commons-cli', name: 'commons-cli', version:'1.3'
compile group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.1.1'
compile group: 'org.slf4j', name: 'slf4j-simple', version:'1.7.12'
compile group: 'mysql', name: 'mysql-connector-java', version:'5.1.38'
testCompile group: 'junit', name: 'junit', version:'4.12'
testCompile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.junit', version:'4.3.0.201604071810-r'
testCompile group: 'org.mockito', name: 'mockito-all', version:'1.10.19'
}
jar {
version = "0.2r"+getDate()
from {
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
}
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes(
'Main-Class': 'br.com.riselabs.cotonet.Main',
"Implementation-Title": "Gradle",
"Implementation-Version": version)
}
exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}
def getDate() {
def date = new Date()
def formattedDate = date.format('yyyyMMddHHmm')
return formattedDate
}