-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
123 lines (92 loc) · 3.34 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
114
115
116
117
118
119
120
121
122
123
group 'io.sharedstreets'
version '0.3.1'
buildscript {
repositories { jcenter()
mavenCentral()}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
//classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
} // Note PF : this plugin does not support resource transformation (needed for akka configuration files
}
apply plugin: 'java'
apply plugin: 'idea'
//apply plugin: 'com.google.protobuf'
apply plugin: 'com.github.johnrengelman.shadow'
import com.github.jengelman.gradle.plugins.shadow.tasks.*
sourceCompatibility = 1.8
repositories {
maven { url "http://repository.apache.org" }
jcenter()
mavenLocal()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
def flinkversion = "1.3.2"
def protobufversion = "3.4.0"
dependencies {
compile 'org.slf4j:slf4j-api:1.7.5'
compile files('external/osmosis-osm-binary.jar')
compile 'com.esri.geometry:esri-geometry-api:1.2.1'
compile "org.apache.flink:flink-java:${flinkversion}"
compile "org.apache.flink:flink-clients_2.10:${flinkversion}"
compile "com.google.protobuf:protobuf-java:${protobufversion}"
compile "com.jsoniter:jsoniter:0.9.15"
compile 'net.sf.geographiclib:GeographicLib-Java:1.46'
compile 'commons-cli:commons-cli:1.4'
testCompile "junit:junit:4.11"
}
//protobuf {
// protoc {
// // The artifact spec for the Protobuf Compiler
// artifact = "com.google.protobuf:protoc:${protobufversion}"
// }
//
// generateProtoTasks {
// ofSourceSet('main')
// }
//
// generatedFilesBaseDir = "$projectDir/src/generated"
//}
//
//clean {
// delete protobuf.generatedFilesBaseDir
//}
idea {
module {
// sourceDirs += file("${protobuf.generatedFilesBaseDir}/main/java");
// if you hate browsing Javadoc
downloadJavadoc = false
// and love reading sources :)
downloadSources = true
}
}
jar {
manifest { attributes 'Main-Class': 'io.sharedstreets.tools.builder.ProcessPBF' }
}
// shadow jar, for use inside a flink cluster (does not include the flink stack)
shadowJar {
dependencies {
include(dependency('org.slf4j:slf4j-api'))
include(dependency(files('external/osmosis-osm-binary.jar')))
include(dependency('com.esri.geometry:esri-geometry-api'))
include(dependency('com.jsoniter:jsoniter'))
include(dependency('net.sf.geographiclib:GeographicLib-Java'))
include(dependency('commons-cli:commons-cli'))
include(dependency('org.apache.flink:flink-java'))
include(dependency('org.apache.flink:flink-clients_2.10'))
}
relocate 'google.protobuf', 'io.sharedstreets.shadow.protobuf'
relocate 'com.google.protobuf', 'io.sharedstreets.shadow.protobuf'
}
// this task generate a jar bundle that include all the flink stack,
// and permit to use the soft from a command line
task allJars(type: ShadowJar) {
from sourceSets.main.output
configurations = [project.configurations.compile]
transform(com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer) { resource = 'reference.conf' }
manifest {
attributes 'Implementation-Title': 'sharedstreets-builder', 'Implementation-Version': version
attributes 'Main-Class': 'io.sharedstreets.tools.builder.ProcessPBF'
}
}