-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
80 lines (67 loc) · 2.65 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
plugins {
id "com.github.johnrengelman.shadow" version '7.1.2'
}
import java.time.ZoneId
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'com.github.johnrengelman.shadow'
repositories {
jcenter()
mavenCentral()
}
ext {
// Organized alphabetically - Please keep it that way!
commonsCliVersion = '1.5.0'
elasticsearchVersion = "7.16.3"
gsonVersion = "2.10.1"
guavaVersion = "32.1.2-jre"
junitJupiterVersion = '5.9.3'
log4jClassicVersion="1.4.14"
log4jVersion="2.20.0"
luceneCoreVersion = "8.11.1"
mockitoVersion = '5.5.0'
slf4jVersion = "2.0.7"
}
dependencies {
// This dependency is used by the application.
implementation "com.google.guava:guava:$guavaVersion"
implementation "com.google.code.gson:gson:$gsonVersion"
implementation "org.apache.lucene:lucene-core:$luceneCoreVersion"
implementation "org.apache.logging.log4j:log4j-api:$log4jVersion"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "commons-cli:commons-cli:$commonsCliVersion"
implementation "org.elasticsearch:elasticsearch-x-content:$elasticsearchVersion"
runtimeOnly "org.apache.logging.log4j:log4j-core:$log4jVersion"
runtimeOnly "ch.qos.logback:logback-classic:$log4jClassicVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
testRuntimeOnly "org.apache.logging.log4j:log4j-core:$log4jVersion"
testRuntimeOnly "ch.qos.logback:logback-classic:$log4jClassicVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
testImplementation "org.mockito:mockito-core:$mockitoVersion"
}
application {
mainClassName = 'LuceneStats.App'
}
test {
useJUnitPlatform()
}
mainClassName = "org.stapledon.lucene.ElasticLuceneStats"
def build_number_full = (System.getenv("BUILD_NUMBER") != null) ? version + "-" + System.getenv("BUILD_NUMBER") : version
shadowJar {
mergeServiceFiles()
exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF'
zip64(true)
manifest {
attributes 'Implementation-Title': rootProject.name
attributes 'Implementation-Version': rootProject.version
attributes 'Implementation-Vendor-Id': rootProject.group
attributes 'Build-Time': ZonedDateTime.now(ZoneId.of("UTC"))
.format(DateTimeFormatter.ISO_ZONED_DATE_TIME)
attributes 'Built-By': InetAddress.localHost.hostName
attributes 'Created-By': 'Gradle ' + gradle.gradleVersion
attributes 'Main-Class': mainClassName
attributes 'ES-Interset-Build-Number': build_number_full
}
}