forked from linkedin/pygradle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (87 loc) · 2.85 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
plugins {
id 'groovy'
id 'idea'
id 'application'
id "com.github.jk1.dependency-license-report" version "0.3.4"
id "com.github.hierynomus.license" version "0.13.1"
id "com.github.johnrengelman.shadow" version "1.2.3"
}
apply from: "$rootDir/gradle/code-quality.gradle"
apply from: "$rootDir/gradle/publishing.gradle"
mainClassName = 'com.linkedin.python.importer.ImporterCLI'
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.5'
compile 'org.apache.httpcomponents:fluent-hc:4.5.1'
compile 'commons-cli:commons-cli:1.3.1'
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'org.apache.commons:commons-compress:1.10'
compile 'commons-io:commons-io:2.4'
}
task setupTestingIvyRepo
def getIvyRepo() {
return file("${rootProject.getBuildDir()}/ivy-repo")
}
task importRequiredDependencies(type: JavaExec) { task ->
classpath = sourceSets.main.runtimeClasspath
main = 'com.linkedin.python.importer.ImporterCLI'
def replacements = [
'alabaster:0.7=alabaster:0.7.1', // candidate for removal
'Babel:0.8=Babel:1.0',
'chardet:2.2=chardet:2.3.0', // candidate for removal
'idna:2.0.0=idna:2.0', // candidate for removal
'pytz:0a=pytz:2016.4', // candidate for removal
'pytz:2004b.2=pytz:2016.4',
'PyYAML:3.02=PyYAML:3.12',
'setuptools:0.6a2=setuptools:19.1.1', // candidate for removal
'setuptools:0.6c1=setuptools:19.1.1',
'sphinx_rtd_theme:0.1=sphinx_rtd_theme:0.1.1', // candidate for removal
].join(",")
def packagesToInclude = [
'flake8:2.6.2',
'Flask:0.12.2',
'pbr:1.8.0',
'pex:1.2.7',
'pip:9.0.1',
'pytest:3.1.2',
'pytest-cov:2.5.1',
'pytest-xdist:1.17.1',
'requests:2.18.1',
'setuptools:33.1.1',
'setuptools-git:1.2',
'six:1.10.0',
'Sphinx:1.4.9',
'virtualenv:15.1.0',
'wheel:0.29.0',
].join(" ")
def forceDeps = [
'setuptools:33.1.1',
].join(',')
args "--repo ${getIvyRepo().absolutePath} $packagesToInclude --replace $replacements --force $forceDeps".split(' ')
outputs.dir(getIvyRepo())
inputs.property('packages', packagesToInclude)
setupTestingIvyRepo.dependsOn(task)
doFirst {
file(getIvyRepo()).mkdir()
}
}
license {
header rootProject.file('codequality/HEADER')
exclude '**/*.template'
}
licenseReport {
configurations = ['compile', 'testCompile']
}
publishing.publications.standardjava {
artifact shadowJar {
classifier "all"
}
artifact distZip {
classifier "all"
}
}
assemble.dependsOn shadowJar
artifactoryPublish.dependsOn shadowJar
build.dependsOn shadowJar