-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle
235 lines (206 loc) · 6.83 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
description "Solr running as Undertow.io servlet"
buildscript {
repositories {
jcenter()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${version_kotlin}"
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'application'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'com.bmuschko.nexus'
apply plugin: 'com.jfrog.bintray'
mainClassName = "uy.kohesive.solr.undertow.App"
applicationDefaultJvmArgs = ["-Dfile.encoding=UTF-8"]
// set other parameters in SOLR_UNDERTOW_OPTS environment variable, for example:
// export SOLR_UNDERTOW_OPTS="-Xms15G -Xmx15G -XX:MaxPermSize=512m -XX:PermSize=256m -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9901 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileKotlin {
kotlinOptions {
jvmTarget = 1.8
languageVersion = 1.3
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = 1.8
languageVersion = 1.3
}
}
tasks.withType(Tar) {
compression = Compression.GZIP
}
task distWithSolr(type: Tar, dependsOn: distTar) {
into("${baseName}-${version}-with-solr-${version_solr}")
from(project.file("src/dist"))
into("lib") {
from(jar)
from(project.configurations.runtime)
}
into("bin") {
from(startScripts)
fileMode = 0755
}
from("example") {
into("example")
exclude("**/.ignore")
exclude("solr-temp/4*")
exclude("solr-logs/solr.log")
exclude("solr-wars/*.war")
exclude("solr-wars/*.zip")
}
from("example/solr-wars/solr-${version_solr}.war") {
into("example/solr-wars")
}
from("example/solr-wars/solr-${version_solr}.zip") {
into("example/solr-wars")
}
classifier = "with-solr-${version_solr}"
}
// TODO: make this copyspec work as shared between dist TAR and ZIP, and figure out the application plugin change with new distribution plugin base
task distZipWithSolr(type: Zip, dependsOn: distZip) {
into("${baseName}-${version}-with-solr-${version_solr}")
from(project.file("src/dist"))
into("lib") {
from(jar)
from(project.configurations.runtime)
}
into("bin") {
from(startScripts)
fileMode = 0755
}
from("example") {
into("example")
exclude("**/.ignore")
exclude("solr-temp/4*")
exclude("solr-logs/solr.log")
exclude("solr-wars/*.war")
exclude("solr-wars/*.zip")
}
from("example/solr-wars/solr-${version_solr}.war") {
into("example/solr-wars")
}
from("example/solr-wars/solr-${version_solr}.zip") {
into("example/solr-wars")
}
classifier = "with-solr-${version_solr}"
}
task(distAll)
distAll.dependsOn clean
distAll.dependsOn test
distAll.dependsOn distWithSolr
distAll.dependsOn distZipWithSolr
distAll.dependsOn installDist
distributions {
main {
contents {
from("example") {
into("example")
exclude("**/.ignore")
exclude("solr-temp/4*")
exclude("solr-logs/solr.log")
exclude("solr-wars/*.war")
exclude("solr-wars/*.zip")
}
}
}
}
repositories {
jcenter()
maven {
url 'http://oss.sonatype.org/content/repositories/snapshots'
}
// if ever compile against Solr 4.10.4 it needs this
maven {
url 'https://maven.restlet.com'
}
}
dependencies {
compile "io.undertow:undertow-servlet:${version_undertow}"
compile("uy.kohesive.klutter:klutter-core:${version_klutter}") {
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jre8"
}
compile("uy.kohesive.klutter:klutter-config-typesafe:${version_klutter}") {
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jre8"
}
compile "com.typesafe:config:${version_typesafe_config}"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${version_kotlin}"
compile "org.jetbrains.kotlin:kotlin-reflect:${version_kotlin}"
compile "com.google.guava:guava:${version_guava}"
compile "org.slf4j:slf4j-api:${version_slf4j}"
runtime "ch.qos.logback:logback-classic:${version_logback}"
runtime "ch.qos.logback:logback-access:${version_logback}"
runtime "org.slf4j:jcl-over-slf4j:${version_slf4j}"
runtime "org.slf4j:jul-to-slf4j:${version_slf4j}"
runtime "org.slf4j:log4j-over-slf4j:${version_slf4j}"
// only for debugging purposes, so we have the correct version of Solr for breakpoints
// runtime "org.apache.solr:solr-core:${version_solr}"
testCompile "junit:junit:${version_junit}"
testCompile "org.jetbrains.kotlin:kotlin-test:${version_kotlin}"
testCompile "nl.komponents.kovenant:kovenant:${version_kovenant}"
// test cases might use Solr
testCompile "org.apache.solr:solr-solrj:${version_solr}"
testCompile("org.apache.solr:solr-core:${version_solr}") {
exclude group: "org.eclipse.jetty"
exclude group: "org.eclipse.jetty.orbit"
}
}
modifyPom {
project {
name 'Solr-Undertow'
description 'Solr / SolrCloud running in high performance server - tiny, fast startup, simple to configure, easy deployment without an application server.'
url 'https://github.com/kohesive/solr-undertow'
inceptionYear '2014'
scm {
url 'https://github.com/kohesive/solr-undertow'
connection 'scm:https://github.com/kohesive/solr-undertow.git'
developerConnection 'scm:[email protected]:kohesive/solr-undertow.git'
}
licenses {
license {
name 'Apache-2.0'
url 'https://github.com/kohesive/solr-undertow/blob/master/LICENSE.txt'
distribution 'repo'
}
}
developers {
developer {
id 'apatrida'
name 'Jayson Minard'
email '[email protected]'
}
}
}
}
nexus {
sign = true
}
bintray {
user = project.hasProperty('bintrayUser') ? bintrayUser : ''
key = project.hasProperty('bintrayKey') ? bintrayKey : ''
pkg {
repo = 'kohesive'
name = project.name
licenses = ['Apache-2.0']
vcsUrl = 'scm:git:[email protected]:kohesive/solr-undertow.git'
version {
name = project.version
desc = 'n/a'
released = new Date()
}
publicDownloadNumbers = false
configurations = ['archives']
}
publish = true
dryRun = false
}