This repository has been archived by the owner on May 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 456
/
build.gradle
158 lines (129 loc) · 4.71 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
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
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'pl.allegro.tech.build.axion-release' version '0.9.9'
id 'com.moowork.node' version '0.8'
id 'com.github.johnrengelman.shadow' version '1.2.0'
}
ext {
prestoVersion = "0.145"
if (System.properties['airpal.prestoVersion'] != null) {
prestoVersion = System.properties['airpal.prestoVersion']
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.moowork.node'
group = 'com.airbnb.airpal'
description = """airpal"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
}
project.version = scmVersion.version
configurations {
provided
}
idea.module.scopes.COMPILE.plus += [configurations.provided]
sourceSets {
main {
compileClasspath += [configurations.provided]
}
}
dependencies {
compile group: 'org.eclipse.jetty', name: 'jetty-util', version: '9.3.9.M1'
compile group: 'org.eclipse.jetty', name: 'jetty-client', version: '9.3.9.M1'
compile group: 'com.google.guava', name: 'guava', version: '18.0'
compile group: 'org.slf4j', name: 'slf4j-api'
compile group: 'ch.qos.logback', name: 'logback-classic'
compile group: 'io.dropwizard', name: 'dropwizard-core', version:'1.0.0-rc2'
compile group: 'io.dropwizard', name: 'dropwizard-jdbi', version:'1.0.0-rc2'
compile group: 'io.dropwizard', name: 'dropwizard-assets', version:'1.0.0-rc2'
compile group: 'io.dropwizard', name: 'dropwizard-views-freemarker', version:'1.0.0-rc2'
compile group: 'io.dropwizard', name: 'dropwizard-metrics-graphite', version:'1.0.0-rc2'
compile group: 'io.dropwizard.modules', name: 'dropwizard-flyway', version:'0.9.0-1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
compile(group: 'com.facebook.presto', name: 'presto-client', version:prestoVersion) {
exclude(group: 'org.eclipse.jetty')
exclude(group: 'org.slf4j')
exclude(group: 'ch.qos.logback')
}
compile(group: 'com.facebook.presto', name: 'presto-spi', version:prestoVersion) {
exclude(group: 'ch.qos.logback')
}
compile(group: 'com.facebook.presto', name: 'presto-main', version:prestoVersion) {
exclude(module: 'javax.servlet-api')
exclude(group: 'org.eclipse.jetty')
exclude(group: 'org.slf4j')
exclude(group: 'ch.qos.logback')
}
compile group: 'com.facebook.presto', name: 'presto-parser', version:prestoVersion
compile group: 'com.hubspot.rosetta', name: 'RosettaJdbi', version:'2.1-SNAPSHOT'
compile group: 'com.opencsv', name: 'opencsv', version:'3.2'
compile group: 'com.amazonaws', name: 'aws-java-sdk', version:'1.10.6'
compile group: 'org.apache.shiro', name: 'shiro-web', version:'1.2.4'
compile group: 'org.apache.shiro', name: 'shiro-guice', version:'1.2.4'
compile group: 'org.secnod.dropwizard', name: 'dropwizard-shiro', version:'0.2.0'
compile group: 'mysql', name: 'mysql-connector-java', version:'5.1.34'
compile group: 'com.h2database', name: 'h2', version:'1.4.190'
provided group: 'org.projectlombok', name: 'lombok', version:'1.12.2'
testCompile group: 'junit', name: 'junit', version:'4.11'
testCompile group: 'org.mockito', name: 'mockito-all', version:'1.10.8'
}
node {
version = '0.10.33'
npmVersion = '2.1.6'
download = System.properties['airpal.useLocalNode'] == null
}
task cleanAssets {
delete file("src/main/resources/assets/build")
}
task installAssets(type: NpmTask) {
args = ['install']
execOverrides {
it.workingDir = file('src/main/resources/assets/').absolutePath
}
}
task buildAssets(type: NodeTask) {
script = file('src/main/resources/assets/node_modules/gulp/bin/gulp.js')
args = ['browserify']
execOverrides {
it.workingDir = file('src/main/resources/assets/').absolutePath
}
}
task buildTar(type: Tar) {
baseName = project.name
compression = Compression.GZIP
extension = "tar.gz"
into("$baseName-$version/lib") {
from jar.archivePath
from configurations.runtime
}
into("$baseName-$version/bin") {
from "scripts/airpal"
fileMode 0755
}
into("$baseName-$version") {
from "reference.example.yml"
rename { String fileName ->
fileName.replace('example.', '')
}
}
}
shadowJar {
transform(com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer)
exclude 'META-INF/*.DSA'
exclude 'META-INF/*.RSA'
exclude 'META-INF/LICENSE'
zip64 true
}
buildAssets.dependsOn installAssets
compileJava.dependsOn buildAssets
buildTar.dependsOn jar
clean.dependsOn cleanAssets