-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.gradle
71 lines (55 loc) · 1.57 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
/*
* Copyright (c) 2007-2015 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.concurrentinc.com/
*/
import java.text.SimpleDateFormat
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.netflix.nebula:gradle-extra-configurations-plugin:2.2.1'
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'provided-base'
archivesBaseName = 'recommender'
ext.cascadingVersion = "3.0.0"
ext.hadoopVersion = '2.6.0'
repositories {
mavenLocal()
mavenCentral()
maven{ url 'http://conjars.org/repo/' }
}
dependencies {
compile( group: 'cascading', name: 'cascading-core', version: cascadingVersion )
compile( group: 'cascading', name: 'cascading-hadoop2-mr1', version: cascadingVersion )
provided( group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: hadoopVersion )
provided( group: 'org.apache.hadoop', name: 'hadoop-common', version: hadoopVersion )
}
jar {
description = "Assembles a Hadoop ready jar file"
doFirst {
into( 'lib' ) {
from configurations.runtime.minus( configurations.provided )
}
}
manifest {
attributes( "Main-Class": "sample/recommender/Main" )
}
}
task distCopy( type: Copy, dependsOn: jar ) {
into "${buildDir}/dist/${archivesBaseName}"
from 'README.md'
from 'build.gradle'
from( 'src' ) {into 'src'}
from( 'data' ) {into 'data'}
from "$buildDir/libs"
}
task dist( type: Tar, dependsOn: distCopy ) {
compression = "GZIP"
classifier = new SimpleDateFormat( "yyyyMMdd" ).format( new Date() )
from "${buildDir}/dist/"
}