-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
113 lines (99 loc) · 2.53 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
109
110
111
112
113
buildscript {
repositories {
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
jcenter()
mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0'
}
}
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
configurations {
deployerJars
}
repositories {
mavenCentral()
maven {
name = 'FTB'
url = 'http://ftb.cursecdn.com/FTB2/maven'
}
}
dependencies {
compile 'com.google.code.gson:gson:2.3.1'//JSON support
compile 'commons-io:commons-io:2.4'//general utility classes
compile 'com.google.guava:guava:18.0'//general utility classes
compile 'org.projectlombok:lombok:1.16.4'//getter/setter equals and hashcode automation
deployerJars 'org.apache.maven.wagon:wagon-ssh:2.2'
}
project.ext {
currentYear = '2015'
}
if (System.getenv().BUILD_NUMBER != null) {
ext.buildNum = System.getenv().BUILD_NUMBER
} else {
ext.buildNum = "9999999"
}
group = 'net.ftb.jsonlib'
version = "0.0.1-${project.buildNum}"
description = "FTB Json Library"
sourceCompatibility = 1.6
targetCompatibility = 1.6
shadowJar {
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
classifier = 'all'
}
build.dependsOn(shadowJar)
jar {
manifest {
attributes 'Launcher-Jenkins': project.buildNum
}
}
task sourceJar(type: Jar) {
from sourceSets.main.java
from sourceSets.main.resources
classifier = "sources"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = "javadoc"
}
artifacts {
archives shadowJar
archives jar
archives sourceJar
archives javadocJar
}
def gitSha() {
return 'git rev-parse HEAD'.execute().text.trim()
}
if (project.hasProperty("local_maven")) {
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://${local_maven}")
}
}
}
}
if (project.hasProperty("remote_maven") && project.hasProperty("sftp_pass")) {
apply plugin: 'maven'
uploadArchives {
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "sftp://${remote_maven}") {
authentication(userName: "${ftp_username}", password: "${sftp_pass}")
}
}
}
}