-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·55 lines (42 loc) · 1.23 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
import java.text.SimpleDateFormat;
/////////////////git version logic///////////////
def cmd = "git rev-parse --short HEAD"
def proc = cmd.execute()
String gitRevision = proc.text.trim()
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss")
String gitTimestamp = format.format(new Date());
/////////////////git version logic///////////////
apply plugin: 'java'
sourceCompatibility=JavaVersion.VERSION_1_8
compileJava.options.encoding = 'UTF-8'
apply plugin: 'maven'
apply plugin: 'eclipse'
version = "1.0.0-SNAPSHOT"
group = "org.hardluaj"
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/groups/public"}
}
sourceSets.main.resources.srcDir 'src/main/java'
task packageSources(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives(packageSources) {
type = 'jar'
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "$targetRepository/releases") {
authentication(userName: targetRepository_user, password: targetRepository_password)
}
}
}
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version:'1.7.9'
compile group: 'org.apache.commons' ,name:'commons-collections4', version:'latest.release', changing: true
}