File tree Expand file tree Collapse file tree 13 files changed +33
-25
lines changed
src/test/java/org/apache/geode/examples/luceneSpatial Expand file tree Collapse file tree 13 files changed +33
-25
lines changed Original file line number Diff line number Diff line change 4040 uses : actions/setup-java@v3
4141 with :
4242 distribution : ${{ matrix.distribution }}
43- java-version : ' 8 '
43+ java-version : ' 17 '
4444 - name : Run All
4545 uses : gradle/gradle-build-action@v2
4646 with :
47- arguments : runAll --console=plain --no-daemon
47+ arguments : runAll -PgeodeRepositoryUrl=https://repository.apache.org/content/repositories/orgapachegeode-1146 - -console=plain --no-daemon
Original file line number Diff line number Diff line change 1616 */
1717
1818plugins {
19- id " org.nosphere.apache.rat" version " 0.6 .0"
20- id " com.diffplug.gradle. spotless" version " 3.0 .0"
21- id " de.undercouch.download" version " 3.1.2 "
19+ id " org.nosphere.apache.rat" version " 0.8 .0"
20+ id " com.diffplug.spotless" version " 6.11 .0"
21+ id " de.undercouch.download" version " 5.0.1 "
2222}
2323
2424allprojects {
@@ -66,6 +66,11 @@ task installGeode(type: Copy) {
6666subprojects {
6767 apply plugin : ' java-library'
6868
69+ java {
70+ sourceCompatibility = JavaVersion . VERSION_17
71+ targetCompatibility = JavaVersion . VERSION_17
72+ }
73+
6974 dependencies {
7075 // All callouts to org.apache.geode here, need to be specified in settings.gradle
7176 // for composite build to work
@@ -88,7 +93,7 @@ subprojects {
8893 }
8994
9095 jar {
91- archiveName " ${ baseName } .${ extension } "
96+ archiveFileName = " ${ archiveBaseName.get() } .${ archiveExtension.get() } "
9297 }
9398
9499 task cleanServer {
Original file line number Diff line number Diff line change 1818# Develop to use latest 1.15.1 artifacts until CI is rebuilt
1919# GEODE-10436
2020version = 2.1.0-build.0
21- geodeVersion = 2.1.+
21+ geodeVersion = 2.0.0
2222
2323# release properties, set these on the command line to validate against
2424# a release candidate
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ gradle.taskGraph.whenReady { taskGraph ->
6363
6464distributions {
6565 src {
66- baseName = ' apache-geode-examples'
66+ distributionBaseName = ' apache-geode-examples'
6767 version = version + ' -src'
6868 contents {
6969 from (rootDir) {
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717subprojects {
18- apply plugin : " com.diffplug.gradle. spotless"
18+ apply plugin : " com.diffplug.spotless"
1919 spotless {
2020 lineEndings = ' unix' ;
2121 java {
2222 target project. fileTree(project. projectDir) { include ' **/*.java' }
23- eclipseFormatFile " ${ rootProject.projectDir} /etc/eclipse-java-google-style.xml"
23+ eclipse() . configFile " ${ rootProject.projectDir} /etc/eclipse-java-google-style.xml"
2424 }
2525 }
2626}
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33distributionPath =wrapper/dists
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
6- distributionUrl =https\://services.gradle.org/distributions/gradle-5.5 -all.zip
6+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3 -all.zip
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717dependencies {
18- compile " org.apache.geode:geode-lucene:$geodeVersion "
18+ implementation " org.apache.geode:geode-lucene:$geodeVersion "
1919}
Original file line number Diff line number Diff line change 1515 * limitations under the License.
1616 */
1717dependencies {
18- compile " org.apache.geode:geode-lucene:$geodeVersion "
19- compile " org.apache.lucene:lucene-spatial-extras:6.4.1"
18+ implementation " org.apache.geode:geode-lucene:$geodeVersion "
19+ implementation " org.apache.lucene:lucene-spatial-extras:9.12.3"
20+ implementation " org.locationtech.spatial4j:spatial4j:0.8"
2021}
2122
2223task copyDependencies (type :Copy ) {
2324 into " $buildDir /libs"
24- from configurations[ ' runtime ' ]
25+ from configurations. runtimeClasspath
2526}
2627
2728build. dependsOn(copyDependencies)
Original file line number Diff line number Diff line change 2727import org .apache .lucene .search .Query ;
2828import org .apache .lucene .search .SearcherManager ;
2929import org .apache .lucene .search .TopDocs ;
30- import org .apache .lucene .store .RAMDirectory ;
30+ import org .apache .lucene .store .ByteBuffersDirectory ;
3131import org .junit .Test ;
3232
3333public class SpatialHelperTest {
@@ -36,7 +36,7 @@ public class SpatialHelperTest {
3636 public void queryFindsADocumentThatWasAdded () throws IOException {
3737
3838 // Create an in memory lucene index to add a document to
39- RAMDirectory directory = new RAMDirectory ();
39+ ByteBuffersDirectory directory = new ByteBuffersDirectory ();
4040 IndexWriter writer = new IndexWriter (directory , new IndexWriterConfig ());
4141
4242 // Add a document to the lucene index
@@ -55,6 +55,6 @@ public void queryFindsADocumentThatWasAdded() throws IOException {
5555 SearcherManager searcherManager = new SearcherManager (writer , null );
5656 IndexSearcher searcher = searcherManager .acquire ();
5757 TopDocs results = searcher .search (query , 100 );
58- assertEquals (1 , results .totalHits );
58+ assertEquals (1 , results .totalHits . value );
5959 }
6060}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ configurations {
2121
2222dependencies {
2323 dependenciesToIncludeInEndpointJar " io.micrometer:micrometer-registry-prometheus:$micrometerVersion "
24- configurations. compile . extendsFrom(configurations . dependenciesToIncludeInEndpointJar)
24+ implementation configurations. dependenciesToIncludeInEndpointJar
2525}
2626
2727jar {
You can’t perform that action at this time.
0 commit comments