-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathbuild.gradle
168 lines (162 loc) · 4.38 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
159
160
161
162
163
164
165
166
167
168
if (project.hasProperty('overrideBuildEnvironment')) {
// Otherwise, assume overrideBuildEnvironment defines a path to a file, and apply it.
apply from: project.overrideBuildEnvironment
}
buildscript {
repositories {
mavenCentral()
mavenLocal()
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
}
}
ext {
libs = [:]
}
libs += [
apache: "org.apache.commons:commons-lang3:3.4",
apacheCommonsIo: "commons-io:commons-io:2.4",
bcpkix: "org.bouncycastle:bcpkix-jdk15on:1.51",
bcprov: "org.bouncycastle:bcprov-jdk15on:1.51",
commonsCli: "commons-cli:commons-cli:1.2",
easymock: "org.easymock:easymock:3.3",
googleGuava: "com.google.guava:guava:18.0",
httpclient: "org.apache.httpcomponents:httpclient:4.3.1",
jacksonCodec: "com.fasterxml.jackson.core:jackson-core:2.5.3",
log4j: "log4j:log4j:1.2.17",
netty: "io.netty:netty-all:4.0.27.Final",
testng: "org.testng:testng:6.8.8",
restliServer: "com.linkedin.pegasus:restli-server:6.0.12",
restliNettyStandalone: "com.linkedin.pegasus:restli-netty-standalone:6.0.12"
]
apply plugin: 'idea'
subprojects {
version='0.0.10'
group='com.linkedin.flashback'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'java'
dependencies {
compile libs.apache
compile libs.apacheCommonsIo
compile libs.bcpkix
compile libs.bcprov
compile libs.commonsCli
compile libs.easymock
compile libs.googleGuava
compile libs.httpclient
compile libs.jacksonCodec
compile libs.log4j
compile libs.netty
testCompile libs.testng
}
repositories {
mavenCentral()
}
test {
useTestNG()
}
tasks.withType(Jar) {
from "$rootDir/LICENSE"
from "$rootDir/NOTICE"
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
def pomConfig = {
licenses {
license {
name "2-CLAUSE BSD"
url "https://github.com/linkedin/flashback/blob/master/LICENSE"
distribution "repo"
}
}
scm {
url "https://github.com/linkedin/flashback.git"
}
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
artifact javadocJar
artifact sourcesJar
pom.withXml {
def root = asNode()
root.appendNode('description', 'Mock the internet')
root.appendNode('name', 'flashback')
root.children().last() + pomConfig
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
pkg {
repo = 'maven'
userOrg = 'linkedin'
name = 'flashback'
vcsUrl = 'https://github.com/linkedin/flashback.git'
}
}
}
project(':flashback-test-util') {
println "Building project 'test-util'"
dependencies {
compile project(':flashback-core-impl')
compile project(':flashback-smartproxy')
compile project(':flashback-netty')
compile libs.testng
}
}
project(':flashback-smartproxy') {
println "Building project 'smartproxy'"
dependencies {
compile project(':flashback-core-impl')
compile project(':flashback-netty')
compile project(':mitm')
}
}
project(':flashback-netty') {
println "Building project 'netty'"
dependencies {
compile project(':flashback-core-impl')
}
}
project(':flashback-admin') {
dependencies {
compile libs.restliServer
compile libs.restliNettyStandalone
compile project(':flashback-smartproxy')
}
task startAdminServer(type: JavaExec) {
main = 'com.linkedin.restli.server.NettyStandaloneLauncher'
if (project.hasProperty('Args')) {
args(Args.split())
}
args += ['-packages', 'com.linkedin.flashback']
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
}
}
project(':flashback-all') {
dependencies {
// this is a meta project that depends on all of the "entry-point" subprojects to make it easier to pull in the
// entire dependency tree.
compile project(':flashback-core-impl')
compile project(':mitm')
compile project(':flashback-test-util')
compile project(':flashback-smartproxy')
compile project(':flashback-netty')
compile project(':flashback-admin')
}
}