|
| 1 | +apply plugin: 'java' |
| 2 | +apply plugin: 'application' |
| 3 | + |
1 | 4 | group 'org.radarcns.restructurehdfs'
|
2 |
| -version '1.0-SNAPSHOT' |
| 5 | +version '0.1-SNAPSHOT' |
| 6 | +mainClassName = 'org.radarcns.RestructureAvroRecords' |
3 | 7 |
|
4 |
| -apply plugin: 'java' |
5 |
| -version = '0.1.0' |
| 8 | +run { |
| 9 | + args = ['webhdfs://radar-test.thehyve.net:50070', '/topicAndroidPhoneNew/android_phone_sensor_acceleration', "${projectDir}/data"] |
| 10 | +} |
6 | 11 |
|
7 | 12 | sourceCompatibility = 1.8
|
| 13 | +targetCompatibility = 1.8 |
8 | 14 |
|
9 | 15 | repositories {
|
10 |
| - mavenCentral() |
| 16 | + jcenter() |
11 | 17 | }
|
12 | 18 |
|
13 | 19 | dependencies {
|
14 |
| - testCompile group: 'junit', name: 'junit', version: '4.11' |
15 |
| - compile 'org.apache.logging.log4j:log4j-core:2.8.1' |
16 | 20 | compile 'org.apache.hadoop:hadoop-common:2.7.3'
|
| 21 | + compile 'org.apache.avro:avro:1.8.1' |
| 22 | + compile 'org.apache.avro:avro-mapred:1.8.1' |
| 23 | + |
| 24 | + runtime 'org.apache.logging.log4j:log4j-core:2.8.1' |
| 25 | + runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.8.1' |
17 | 26 | runtime 'org.apache.hadoop:hadoop-hdfs:2.7.3'
|
18 |
| - compile 'org.apache.avro:avro:1.7.7' |
19 |
| - compile 'org.apache.avro:avro-mapred:1.7.7' |
20 |
| - compile 'com.fasterxml.jackson.core:jackson-core:2.8.7' |
| 27 | + |
| 28 | + testCompile group: 'junit', name: 'junit', version: '4.11' |
21 | 29 | }
|
22 | 30 |
|
23 | 31 | //create a single Jar with all dependencies
|
24 | 32 | task fatJar(type: Jar) {
|
25 | 33 | manifest {
|
26 |
| - attributes 'Implementation-Title': 'Gradle Jar File Example', |
| 34 | + attributes 'Implementation-Title': 'radar-restructure-hdfs', |
27 | 35 | 'Implementation-Version': version,
|
28 |
| - 'Main-Class': 'org.radarcns.RestructureAvroRecords' |
| 36 | + 'Main-Class': mainClassName |
29 | 37 | }
|
30 | 38 | baseName = project.name + '-all'
|
31 |
| - from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } |
| 39 | + from { configurations.runtime.collect { |
| 40 | + it.isDirectory() ? it : zipTree(it).matching{ exclude { it.path.contains('META-INF') } } |
| 41 | + } } |
32 | 42 | with jar
|
33 | 43 | }
|
34 | 44 |
|
|
0 commit comments