-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
152 lines (127 loc) · 4.41 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
buildscript {
repositories {
jcenter()
maven {
url 'http://xbib.org/repository'
}
}
dependencies {
classpath "org.elasticsearch.gradle:build-tools:6.3.2"
}
}
import java.time.ZoneOffset
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
plugins {
id "org.sonarqube" version "2.6.1"
id "io.codearte.nexus-staging" version "0.11.0"
id "org.xbib.gradle.plugin.jflex" version "1.2.0"
id "org.xbib.gradle.plugin.asciidoctor" version "1.5.6.0.1"
}
printf "Date: %s\nHost: %s\nOS: %s %s %s\nJVM: %s %s %s %s\nGradle: %s Groovy: %s Java: %s\n" +
"Build: group: ${project.group} name: ${project.name} version: ${project.version}\n",
ZonedDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME),
InetAddress.getLocalHost(),
System.getProperty("os.name"),
System.getProperty("os.arch"),
System.getProperty("os.version"),
System.getProperty("java.version"),
System.getProperty("java.vm.version"),
System.getProperty("java.vm.vendor"),
System.getProperty("java.vm.name"),
gradle.gradleVersion, GroovySystem.getVersion(), JavaVersion.current()
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'idea'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'org.xbib.gradle.plugin.jflex'
apply plugin: 'org.xbib.gradle.plugin.asciidoctor'
esplugin {
description 'Plugin bundle for Elasticsearch'
name 'elasticsearch-plugin-bundle'
classname 'org.xbib.elasticsearch.plugin.bundle.BundlePlugin'
}
licenseFile = rootProject.file('LICENSE.txt')
noticeFile = rootProject.file('NOTICE.txt')
configurations {
wagon
}
dependencies {
compile "com.ibm.icu:icu4j:${project.property('icu4j.version')}"
compile "org.xbib:standardnumber:${project.property('standardnumber.version')}"
testCompile "org.elasticsearch:elasticsearch:${project.property('elasticsearch.version')}"
testCompile "org.codelibs.elasticsearch.module:analysis-common:${project.property('elasticsearch.version')}"
testCompile "org.elasticsearch.plugin:transport-netty4-client:${project.property('elasticsearch.version')}"
wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}"
}
compileJava {
}
compileTestJava {
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
jar {
manifest {
attributes(
'Implementation-Title': "${project.group}#${project.name};${project.version}",
'Implementation-Version': version,
'Implementation-Vendor': "xbib",
'Build-Date': ZonedDateTime.now(ZoneOffset.UTC),
'Build-Java-Version': System.getProperty("java.version"),
'X-Compile-Source-JDK': compileJava.targetCompatibility,
'X-Compile-Target-JDK': compileJava.sourceCompatibility,
'X-Compile-Elasticsearch-Version': version,
'X-Compile-Lucene-Version': project.property('lucene.version'),
'X-Compile-Elasticsearch-Snapshot': false
)
}
}
afterEvaluate {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.compilerArgs << "-Xlint:none,-fallthrough" << "-Xdoclint:none"
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
test {
enabled = true
}
integTest {
enabled = true
}
clean {
delete fileTree('.') { include '.local*.log' }
}
artifacts {
archives sourcesJar, javadocJar
}
if (project.hasProperty('signing.keyId')) {
signing {
sign configurations.archives
}
}
apply from: 'gradle/ext.gradle'
apply from: 'gradle/publish.gradle'
apply from: 'gradle/sourcequality.gradle'
asciidoctor {
attributes toc: 'left',
doctype: 'book',
icons: 'font',
encoding: 'utf-8',
sectlink: true,
sectanchors: true,
linkattrs: true,
imagesdir: 'img',
'source-highlighter': 'coderay'
}
checkstyleMain.source = 'src/main/java'
// Java 11: Method not found while parsing signature: java.lang.Thread#stop(java.lang.Throwable)
forbiddenApisMain.enabled = false
forbiddenApisTest.enabled = false
forbiddenPatterns.exclude('**/*.txt','**/*.brk','**/*.nrm','**/*.fst','**/*.tree')
licenseHeaders.enabled = false