forked from VIDA-NYU/ache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
146 lines (131 loc) · 5.35 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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: "jacoco"
apply plugin: 'com.github.kt3k.coveralls'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = "UTF-8"
version = '0.12.0-SNAPSHOT'
mainClassName = 'focusedCrawler.Main'
applicationDefaultJvmArgs = ["-Dname=ache -XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError"]
repositories {
mavenCentral()
}
dependencies {
// Logging
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.+'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.1.+'
// Commons
compile group: 'com.google.guava', name: 'guava', version: '20.0'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
compile group: 'org.apache.commons', name: 'commons-compress', version: '1.12'
compile group: 'commons-codec', name: 'commons-codec', version: '1.10'
compile group: 'commons-validator', name: 'commons-validator', version: '1.5.1'
compile group: 'com.github.crawler-commons', name: 'crawler-commons', version: '0.9'
// CLI
compile group: 'io.airlift', name: 'airline', version: '0.7'
// Data serialization
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.5'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: '2.8.5'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.8.5'
compile group: 'com.esotericsoftware', name: 'kryo', version: '4.0.0'
compile group: 'de.javakaffee', name: 'kryo-serializers', version: '0.42'
// REST server dependencies
compile group: 'com.sparkjava', name: 'spark-core', version: '2.5.3'
// Metrics and monitoring
compile group: 'io.dropwizard.metrics', name: 'metrics-core', version: '3.1.3'
compile group: 'io.dropwizard.metrics', name: 'metrics-json', version: '3.1.3'
compile group: 'io.dropwizard.metrics', name: 'metrics-jvm', version: '3.1.3'
// Data management and repositories
compile group: 'org.rocksdb', name: 'rocksdbjni', version: '5.8.7'
compile group: 'org.elasticsearch.client', name: 'elasticsearch-rest-client', version: '5.6.7'
compile group: 'org.apache.kafka', name: 'kafka-clients', version: '0.11.0.1'
compile('org.netpreserve.commons:webarchive-commons:1.1.8') {
exclude group: 'org.apache.hadoop', module: 'hadoop-core'
exclude group: 'junit', module: 'junit'
}
// Data parsing and extraction
compile group: 'org.apache.tika', name: 'tika-parsers', version: '1.18'
compile group: 'com.syncthemall', name: 'boilerpipe', version: '1.2.2'
compile group: 'net.sourceforge.nekohtml', name: 'nekohtml', version: '1.9.22'
compile group: 'org.jsoup', name: 'jsoup', version: '1.10.3'
compile group: 'org.apache.lucene', name: 'lucene-analyzers-common', version: '7.3.1'
// HTTP libraries
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.8.1'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
// Others
compile group: 'com.github.haifengl', name: 'smile-core', version: '1.5.0'
compile group: 'org.roaringbitmap', name: 'RoaringBitmap', version: '0.7.8'
compile group: 'com.amazonaws', name: 'aws-java-sdk-s3', version: '1.11.213'
// TODO: fill these in from Maven Central instead of that local libs dir
compile files('libs/langdetect-03-03-2014.jar') // TODO: upgrade to newer version from maven
compile files('libs/jsonic-1.2.0.jar') // required by by langdetect-03-03-2014.jar
// Test time dependencies
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.+'
testCompile group: 'org.eclipse.jetty', name: 'jetty-server', version: '9.3.6.v20151106'
// for tests of crawler commons library fork
testCompile group: 'com.squareup.okhttp3', name: 'mockwebserver', version: '3.8.1'
}
//
// Make sure that ache-dashboard is compiled and copied into resources folder
// before the resources are processed and bundled into the JAR file
//
processResources {
dependsOn ':ache-dashboard:install'
}
//
// Adds version to final JAR artifact
//
jar {
manifest {
attributes(
"Implementation-Title": project.name,
"Implementation-Version": version
)
}
}
//
// Copies config folder into final distribution file
//
task copyConfig {
def f = file("$buildDir/config")
outputs.dir f
doLast {
copy {
from "config/"
into "$buildDir/config"
exclude "sample_model", "sample_training_data", "sample.seeds"
}
}
}
applicationDistribution.from(copyConfig) {
into "config"
}
//
// Integration for test coverage service: coveralls
//
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(
dir: it,
exclude: ['focusedCrawler/tools/**']
)
})
}
}