-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
103 lines (87 loc) · 2.79 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
/*
Copyright 2015 Battams, Derek
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.ysb33r.gradle:bintray:1.6'
}
}
import org.ysb33r.gradle.bintray.BintrayGenericUpload
plugins {
id 'java'
id 'eclipse'
id 'application'
id 'net.nemerosa.versioning' version '1.3.0'
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
versioning {
releaseMode = 'snapshot'
}
versionFile {
def props = new File(sourceSets.main.resources.srcDirs[0], 'sdjson-grabber-versioning.properties')
outputs.file props
outputs.upToDateWhen { false }
file = props
}
group = 'org.schedulesdirect'
version = versioning.info.display
sourceCompatibility = '1.7'
mainClassName = 'org.schedulesdirect.grabber.Grabber'
repositories {
mavenCentral()
jcenter()
maven {
url 'https://oss.jfrog.org/artifactory/repo'
}
}
dependencies {
compile 'org.schedulesdirect:sdjson-api:0.20141201.1'
compile 'commons-logging:commons-logging:1.1.1'
compile 'org.json:json:20140107'
compile('com.fasterxml.jackson.datatype:jackson-datatype-json-org:2.5.1') {
exclude(group: 'org.apache.geronimo.bundles', module: 'json')
}
compile 'commons-io:commons-io:1.4'
compile 'commons-codec:commons-codec:1.3'
compile 'org.apache.httpcomponents:fluent-hc:4.2.1'
compile 'log4j:log4j:1.2.17'
compile 'com.beust:jcommander:1.35'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile 'org.powermock:powermock-module-junit4:1.5.4'
testCompile 'org.powermock:powermock-api-mockito:1.5.4'
}
distTar {
compression = Compression.GZIP
}
task uploadSanityChecks << {
assert System.getProperty('bintray.user')
assert System.getProperty('bintray.key')
assert versioning.info.branch.startsWith('release/')
assert !versioning.info.display.contains('-dirty')
}
task uploadArchives (type:BintrayGenericUpload) {
username System.getProperty('bintray.user')
apiKey System.getProperty('bintray.key')
repoOwner 'slugger'
repoName 'generic'
packageName 'sdjson-grabber'
sources distZip.outputs.files
sources distTar.outputs.files
dependsOn uploadSanityChecks, distZip, distTar
onlyIf { !version.endsWith("SNAPSHOT") }
}
compileJava { inputs.file versionFile }