-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
140 lines (122 loc) · 5.27 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
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'gradle-one-jar'
// Use Java 8 by default
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
// UTF-8 should be standard by now. So use it!
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
repositories {
mavenCentral()
}
// Add Gradle OneJar Plugin, see https://github.com/rholder/gradle-one-jar
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
apply plugin: 'checkstyle'
checkstyle {
ignoreFailures = true
configFile = rootProject.file('codequality/checkstyle.xml')
}
// FindBugs
apply plugin: 'findbugs'
findbugs {
ignoreFailures = true
}
// PMD
apply plugin: 'pmd'
//tasks.withType(Pmd) { reports.html.enabled true }
// Set our project variables
project.ext {
deserver = '0.1.0'
}
dependencies {
compile 'org.elasticsearch:elasticsearch:1.7.1'
compile 'com.google.guava:guava:18.0'
compile 'org.eclipse.jetty:jetty-servlet:9.3.2.v20150730'
compile 'org.eclipse.jetty:jetty-server:9.3.2.v20150730'
compile 'org.eclipse.jetty:jetty-jmx:9.3.2.v20150730'
compile 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.6.1'
compile 'com.squarespace.jersey2-guice:jersey2-guice:0.10'
compile 'com.google.inject.extensions:guice-servlet:4.0'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.4.1'
compile 'org.glassfish.jersey.core:jersey-server:2.18'
compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.18'
//needed for jersey 2.16
compile 'org.glassfish.jersey.media:jersey-media-jaxb:2.18'
compile 'org.glassfish.jersey.media:jersey-media-multipart:2.18'
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.18'
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'joda-time:joda-time:2.8.1'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.netflix.archaius:archaius-core:0.6.5'
compile 'ch.qos.logback:logback-classic:1.1.3'
compile 'org.logback-extensions:logback-ext-loggly:0.1.2'
compile 'ch.qos.logback.contrib:logback-json-classic:0.1.2'
compile 'ch.qos.logback.contrib:logback-jackson:0.1.2'
compile 'org.codehaus.janino:janino:2.7.8'
compile 'org.codehaus.groovy:groovy-all:2.4.3'
compile 'org.apache.lucene:lucene-expressions:4.10.2'
compile 'com.netflix.hystrix:hystrix-core:1.4.14'
compile 'com.netflix.hystrix:hystrix-metrics-event-stream:1.4.14'
compile 'com.netflix.hystrix:hystrix-servo-metrics-publisher:1.4.14'
compile 'com.netflix.servo:servo-core:0.11.2'
compile 'com.google.guava:guava:18.0'
compile 'org.projectlombok:lombok:1.16.4'
compile 'com.netflix.feign:feign-core:8.5.0'
compile 'com.netflix.feign:feign-jackson:8.5.0'
compile 'com.google.api-client:google-api-client:1.20.0'
compile 'com.google.http-client:google-http-client:1.20.0'
compile 'com.google.oauth-client:google-oauth-client:1.20.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.20.0'
compile 'com.google.apis:google-api-services-bigquery:v2-rev224-1.20.0'
compile 'net.logstash.logback:logstash-logback-encoder:4.5.1'
testCompile 'junit:junit:latest.release'
}
mainClassName = "com.dailymotion.pixelle.common.server.StartServer"
task wrapper(type: Wrapper) {
gradleVersion = '2.6'
}
applicationName = "de"
applicationDefaultJvmArgs += "-Dfile.encoding=UTF-8"
applicationDefaultJvmArgs += "-server"
//applicationDefaultJvmArgs += "-verbose:class"
applicationDefaultJvmArgs += "-Xms1g"
applicationDefaultJvmArgs += "-Xmx2g"
applicationDefaultJvmArgs += "-Xss256k"
applicationDefaultJvmArgs += "-Djava.awt.headless=true"
applicationDefaultJvmArgs += "-Djava.net.preferIPv4Stack=true"
applicationDefaultJvmArgs += "-XX:+UseParNewGC"
applicationDefaultJvmArgs += "-XX:+UseConcMarkSweepGC"
applicationDefaultJvmArgs += "-XX:CMSInitiatingOccupancyFraction=75"
applicationDefaultJvmArgs += "-XX:+UseCMSInitiatingOccupancyOnly"
applicationDefaultJvmArgs += "-XX:+PrintGCDetails"
applicationDefaultJvmArgs += "-XX:+PrintGCTimeStamps"
applicationDefaultJvmArgs += "-XX:+PrintClassHistogram"
applicationDefaultJvmArgs += "-XX:+PrintTenuringDistribution"
applicationDefaultJvmArgs += "-XX:+PrintGCApplicationStoppedTime"
applicationDefaultJvmArgs += "-Xloggc:/var/log/elasticsearch/gc.log"
applicationDefaultJvmArgs += "-XX:+HeapDumpOnOutOfMemoryError"
applicationDefaultJvmArgs += "-XX:HeapDumpPath=/var/log/pxl-deserver-heapdump.hprof"
applicationDefaultJvmArgs += "-XX:+DisableExplicitGC"
applicationDefaultJvmArgs += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
//enable jmx on port 8005 for prod env
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote"
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote.port=7199"
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote.rmi.port=7199"
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote.local.only=false"
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote.authenticate=false"
applicationDefaultJvmArgs += "-Dcom.sun.management.jmxremote.ssl=false"
task de(type: OneJar) {
mainClass = 'com.dailymotion.pixelle.common.server.StartServer'
archiveName = 'pxl-deserver.jar'
}
artifacts {
archives de
}