Skip to content

Commit e75891a

Browse files
committed
update to Gradle 5.2.1, update to module structure, update to module ES server
1 parent 648b4e1 commit e75891a

File tree

411 files changed

+745
-678
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+745
-678
lines changed

build.gradle

+78-8
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ buildscript {
66
}
77
}
88
dependencies {
9-
classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:6.3.2.1"
9+
classpath "org.xbib.elasticsearch:gradle-plugin-elasticsearch-build:${project.property('elasticsearch-devkit.version')}"
1010
}
1111
}
1212

13+
import java.time.ZoneOffset
1314
import java.time.ZonedDateTime
1415
import java.time.format.DateTimeFormatter
1516

@@ -42,9 +43,9 @@ apply plugin: 'org.xbib.gradle.plugin.asciidoctor'
4243

4344
esplugin {
4445
description 'Plugin bundle for Elasticsearch'
45-
classname 'org.xbib.elasticsearch.plugin.bundle.BundlePlugin'
4646
name 'elasticsearch-plugin-bundle'
4747
url 'https://github.com/jprante/elasticsearch-plugin-bundle'
48+
classname 'org.xbib.elasticsearch.plugin.bundle.BundlePlugin'
4849
}
4950

5051
configurations {
@@ -54,30 +55,98 @@ configurations {
5455
dependencies {
5556
compile "com.ibm.icu:icu4j:${project.property('icu4j.version')}"
5657
compile "org.xbib:standardnumber:${project.property('standardnumber.version')}"
57-
testCompile "org.xbib.elasticsearch:elasticsearch-analysis-common:${project.property('xbib-elasticsearch-test.version')}"
58-
testCompile "org.apache.logging.log4j:log4j-core:${project.property('log4j.version')}"
59-
testCompile "org.elasticsearch.plugin:transport-netty4-client:${project.property('elasticsearch.version')}"
58+
testCompile "org.xbib.elasticsearch:elasticsearch:${project.property('elasticsearch-server.version')}"
59+
testCompile "org.xbib.elasticsearch:elasticsearch-analysis-common:${project.property('elasticsearch-analysis-common.version')}"
60+
testCompile "org.xbib.elasticsearch:transport-netty4:${project.property('elasticsearch-transport-netty4.version')}"
6061
wagon "org.apache.maven.wagon:wagon-ssh:${project.property('wagon.version')}"
6162
}
6263

63-
sourceCompatibility = JavaVersion.VERSION_1_8
64-
targetCompatibility = JavaVersion.VERSION_1_8
64+
compileJava {
65+
}
66+
67+
compileTestJava {
68+
}
69+
70+
tasks.withType(Javadoc) {
71+
options.addStringOption('Xdoclint:none', '-quiet')
72+
}
73+
74+
afterEvaluate {
75+
compileJava {
76+
inputs.property("moduleName", 'org.xbib.elasticsearch.plugin.bundle')
77+
sourceCompatibility = JavaVersion.VERSION_11
78+
targetCompatibility = JavaVersion.VERSION_11
79+
doFirst {
80+
options.compilerArgs = [
81+
"-Xlint:-try",
82+
'--module-path', classpath.asPath
83+
84+
]
85+
classpath = files()
86+
}
87+
}
88+
compileTestJava {
89+
inputs.property("moduleName", 'org.xbib.elasticsearch.plugin.bundle.test')
90+
sourceCompatibility = JavaVersion.VERSION_11
91+
targetCompatibility = JavaVersion.VERSION_11
92+
doFirst {
93+
options.compilerArgs = [
94+
"-Xlint:-cast,-deprecation,-rawtypes,-try,-unchecked",
95+
"-proc:none",
96+
'--module-path', classpath.asPath
97+
]
98+
classpath = files()
99+
}
100+
}
101+
javadoc {
102+
enabled = true
103+
inputs.property("moduleName", 'org.xbib.elasticsearch.plugin.bundle')
104+
doFirst {
105+
options.addStringOption('-module-path', classpath.asPath)
106+
classpath = files()
107+
}
108+
}
109+
jar {
110+
inputs.property("moduleName", 'org.xbib.elasticsearch.plugin.bundle')
111+
manifest {
112+
attributes(
113+
'Implementation-Title': "${project.group}#${project.name};${project.version}",
114+
'Implementation-Version': version,
115+
'Implementation-Vendor': "${user}",
116+
'Build-Date': ZonedDateTime.now(ZoneOffset.UTC),
117+
'Build-Java-Version': System.getProperty("java.version"),
118+
'X-Compile-Source-JDK': compileJava.targetCompatibility,
119+
'X-Compile-Target-JDK': compileJava.sourceCompatibility,
120+
'X-Compile-Elasticsearch-Version': version,
121+
'X-Compile-Lucene-Version': project.property('lucene.version'),
122+
'X-Compile-Elasticsearch-Snapshot': false
123+
)
124+
}
125+
}
126+
}
65127

66128
test {
67129
enabled = false
130+
dependsOn jar, testJar
68131
include '**/*Test*'
69132
systemProperty 'path.home', System.getProperty("user.dir")
70133
testLogging {
71134
showStandardStreams = false
72135
exceptionFormat = 'full'
73136
}
74137
}
138+
75139
randomizedTest {
76140
enabled = false
141+
dependsOn jar, testJar
77142
}
143+
78144
esTest {
79-
dependsOn jar
80145
enabled = true
146+
dependsOn jar, testJar
147+
//systemProperty 'tests.class', 'org.xbib.elasticsearch.plugin.bundle.test.index.analysis.icu.IcuNumberFormatTests'
148+
jvmArg '--add-reads=org.xbib.elasticsearch.randomizedtesting=org.xbib.elasticsearch.plugin.bundle'
149+
jvmArg '--add-reads=org.xbib.elasticsearch.randomizedtesting=org.xbib.elasticsearch.plugin.bundle.test'
81150
}
82151

83152
clean {
@@ -111,4 +180,5 @@ asciidoctor {
111180
}
112181

113182
checkstyleMain.source = 'src/main/java'
183+
114184
forbiddenPatterns.exclude('**/*.txt')

gradle.properties

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
group = org.xbib.elasticsearch.plugin
22
name = elasticsearch-plugin-bundle
3-
version = 6.3.2.2
3+
version = 6.3.2.3
4+
5+
elasticsearch-server.version = 6.3.2.2
6+
elasticsearch-libs.version = 6.3.2.1
7+
elasticsearch-analysis-common.version = 6.3.2.2
8+
elasticsearch-transport-netty4.version = 6.3.2.2
9+
elasticsearch-devkit.version = 6.3.2.6
410

5-
xbib-elasticsearch-test.version = 6.3.2.1
611
elasticsearch.version = 6.3.2
712
lucene.version = 7.3.1
13+
814
icu4j.version = 62.1
915
log4j.version = 2.11.0
1016
jackson.version = 2.8.11
@@ -14,5 +20,6 @@ wagon.version = 3.0.0
1420
spatial4j.version = 0.7
1521
jts.version = 1.15.1
1622
jna.version = 4.5.1
23+
checkstyle.version = 8.13
1724

18-
org.gradle.warning.mode=all
25+
org.gradle.warning.mode = all

gradle/wrapper/gradle-wrapper.jar

-987 Bytes
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Oct 01 19:05:53 CEST 2018
1+
#Fri Mar 08 12:42:11 CET 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip

gradlew

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

settings.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
rootProject.name = name
2-
enableFeaturePreview('STABLE_PUBLISHING')

src/main/java/module-info.java

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
module org.xbib.elasticsearch.plugin.bundle {
2+
3+
exports org.xbib.elasticsearch.plugin.bundle;
4+
exports org.xbib.elasticsearch.plugin.bundle.action.isbnformat;
5+
exports org.xbib.elasticsearch.plugin.bundle.action.langdetect;
6+
exports org.xbib.elasticsearch.plugin.bundle.common.decompound.patricia;
7+
exports org.xbib.elasticsearch.plugin.bundle.common.fsa;
8+
exports org.xbib.elasticsearch.plugin.bundle.common.langdetect;
9+
exports org.xbib.elasticsearch.plugin.bundle.common.reference;
10+
exports org.xbib.elasticsearch.plugin.bundle.common.standardnumber;
11+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.autophrase;
12+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.baseform;
13+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.concat;
14+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.decompound.fst;
15+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.decompound.patricia;
16+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.german;
17+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.hyphen;
18+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.icu.segmentation;
19+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.icu.tokenattributes;
20+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.icu.tools;
21+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.icu;
22+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.lemmatize;
23+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.naturalsort;
24+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.sortform;
25+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.standardnumber;
26+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.symbolname;
27+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.worddelimiter;
28+
exports org.xbib.elasticsearch.plugin.bundle.index.analysis.year;
29+
exports org.xbib.elasticsearch.plugin.bundle.index.mapper.icu;
30+
exports org.xbib.elasticsearch.plugin.bundle.index.mapper.langdetect;
31+
exports org.xbib.elasticsearch.plugin.bundle.index.mapper.reference;
32+
exports org.xbib.elasticsearch.plugin.bundle.index.mapper.standardnumber;
33+
exports org.xbib.elasticsearch.plugin.bundle.query.decompound;
34+
35+
requires static org.xbib.elasticsearch.server;
36+
requires static org.xbib.elasticsearch.lucene;
37+
requires static org.xbib.elasticsearch.jackson;
38+
requires static org.xbib.elasticsearch.joda;
39+
requires static org.xbib.elasticsearch.log4j;
40+
41+
requires icu4j;
42+
}

src/main/java/org/xbib/elasticsearch/action/isbnformat/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/action/langdetect/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/common/decompound/patricia/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/common/langdetect/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/common/reference/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/common/standardnumber/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/autophrase/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/baseform/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/concat/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/decompound/fst/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/decompound/patricia/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/hyphen/package-info.java

-4
This file was deleted.

src/main/java/org/xbib/elasticsearch/index/analysis/icu/tools/package-info.java

-4
This file was deleted.

0 commit comments

Comments
 (0)