forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.example
162 lines (136 loc) · 5.52 KB
/
build.gradle.example
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// Tasks to perform when no task is specified
defaultTasks 'clean', 'build', 'shadowJar'
apply plugin: 'eclipse'
apply plugin: 'java' // Specifies that this is a Java project, allows Javadoc generation.
apply plugin: 'application' // Adds the 'gradle run' task
apply plugin: 'shadow' // Explodes dependencies into the JAR
// Minimum Java version required
sourceCompatibility = 1.7
targetCompatibility = 1.7
// Basic project information
group = 'org.opentripplanner'
version = '1.0.0-SNAPSHOT'
description = 'OpenTripPlanner'
// Function to capture the output of the git describe command (version/commit)
def describe = { ->
try {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe', '--tags', '--dirty'
standardOutput = stdout
}
return stdout.toString().trim()
}
catch (ignored) {
return null;
}
}
// Extended project information
ext { // can also be referred to as ext.url etc.
url = 'https://github.com/opentripplanner/OpenTripPlanner'
jersey_version = "1.18"
//gitDescribe = "git-" + describe()
}
jar {
manifest {
attributes 'Main-Class': 'org.opentripplanner.standalone.OTPMain'
}
}
eclipse.classpath.downloadSources=true
repositories {
// place this repo first, because of license issues on jai_core
maven { url 'http://download.osgeo.org/webdav/geotools' }
mavenLocal()
mavenCentral()
maven { url "http://nexus.onebusaway.org/content/repositories/releases" }
maven { url "http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apache.axis2" }
maven { url "http://repo.opengeo.org" }
maven { url "http://download.java.net/maven/2" }
}
// The 'buildscript' block specified dependencies for the execution of the Gradle build script itself
buildscript {
// https://github.com/johnrengelman/shadow
// which will merge JAR files without ruining their META-INF
repositories { jcenter() }
dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:0.8' }
}
dependencies {
compile(
'org.mapdb:mapdb:0.9.10',
'ar.com.hjg:pngj:2.0.1',
'cglib:cglib:2.2.2',
'ch.qos.logback:logback-classic:1.0.13',
'com.beust:jcommander:1.27',
'com.google.guava:guava:14.0.1',
'com.google.protobuf:protobuf-java:2.5.0',
'com.ning:async-http-client:1.7.19',
'com.fasterxml.jackson.core:jackson-core:2.3.0',
'com.fasterxml.jackson.core:jackson-databind:2.3.0',
'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.3.0',
'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.3.0',
'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.3.0',
"com.sun.jersey:jersey-core:$jersey_version",
"com.sun.jersey:jersey-grizzly2:$jersey_version",
"com.sun.jersey:jersey-servlet:$jersey_version",
"com.sun.jersey:jersey-server:$jersey_version",
"com.sun.jersey.contribs:jersey-spring:$jersey_version",
'com.vividsolutions:jts:1.13', // why do we need to specifically include this, it's transitive
'commons-discovery:commons-discovery:0.4',
'commons-lang:commons-lang:2.6',
'crosby.binary:osmpbf:1.2.1',
'javassist:javassist:3.8.0.GA',
'javax.annotation:jsr250-api:1.0',
'javax.inject:javax.inject:1',
'joda-time:joda-time:2.1',
'net.java.dev.jets3t:jets3t:0.8.1',
'net.lingala.zip4j:zip4j:1.3.1',
'net.sf.flexjson:flexjson:2.0',
'net.sourceforge.javacsv:javacsv:2.0',
'org.glassfish.hk2:hk2-api:2.2.0',
'org.glassfish.grizzly:grizzly-http-server:2.3.8',
'org.glassfish.jersey.core:jersey-common:2.8',
'org.glassfish.jersey.core:jersey-server:2.8',
'org.apache.axis:axis:1.4',
'org.apache.axis:axis-jaxrpc:1.4',
'org.apache.commons:commons-compress:1.0',
'org.apache.commons:commons-math3:3.0',
'org.apache.httpcomponents:httpclient:4.1.2',
'org.codehaus.jettison:jettison:1.1',
'org.geotools:gt-arcgrid:9.2',
'org.geotools:gt-coverage:9.2',
'org.geotools:gt-epsg-hsql:9.2',
'org.geotools:gt-geojson:9.2',
'org.geotools:gt-geotiff:9.2',
'org.geotools:gt-referencing:9.2',
'org.geotools:gt-shapefile:9.2',
'org.jeromq:jeromq:0.2.0',
'org.onebusaway:onebusaway-gtfs:1.3.3',
'org.processing:core:1.0.7',
'org.slf4j:jcl-over-slf4j:1.7.5',
'org.slf4j:jul-to-slf4j:1.7.5',
'org.apache.lucene:lucene-core:4.7.1',
'org.apache.lucene:lucene-queries:4.7.1',
'org.apache.lucene:lucene-analyzers-common:4.7.1',
'org.apache.lucene:lucene-queryparser:4.7.1',
'javax.servlet:servlet-api:2.5', //provided
[group: 'net.sf.json-lib', name: 'json-lib', version: '2.1', classifier: 'jdk15']
)
testCompile(
'org.mockito:mockito-all:1.9.0',
'com.sun.jersey:jersey-client:1.17.1',
'junit:junit:4.8.1'
)
}
task resources << {
new File('${buildDir}').mkdirs()
}
// As soon as the file is created, it is wiped out by the new build...
task saveBuildInfo(dependsOn: 'resources') << {
ant.propertyfile(
file: "${buildDir}/build.properties",
comment: "This file is automatically generated - DO NOT EDIT!" ) {
entry( key: "version", value: "${project.version}" )
entry( key: "buildTimestamp", value: "${new Date().format('yyyy-MM-dd HH:mm:ss z')}" )
entry( key: "gitDescribe", value: describe() )
}
}