Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: 8
distribution: 'zulu'
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: 8
distribution: 'zulu'
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -46,11 +46,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: 8
distribution: 'zulu'
java-version: 17
distribution: 'temurin'
- name: Run linter
run: bash scripts/lint.sh
- name: Yaml lint check
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ This SDK is compatible with the following JDK versions:

| SDK Version | Supported Java Versions |
|-------------|-------------------------|
| v1.x | JDK 8 and above |
| v1.x | JDK 17 and above |

## 💡 Learn more

Expand Down
13 changes: 8 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ plugins {
id 'signing'
id 'jacoco'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "com.diffplug.spotless" version "6.13.0"
id "com.diffplug.spotless" version "6.25.0"
}

group = 'com.meilisearch.sdk'
archivesBaseName = 'meilisearch-java'
version = '0.15.0'

base {
archivesName.set('meilisearch-java')
}

jacoco {
toolVersion = "0.8.8"
reportsDirectory = layout.buildDirectory.dir("$projectDir/tmp/coverage")
Expand Down Expand Up @@ -117,8 +120,8 @@ task integrationTest(type: Test) {
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

withJavadocJar()
withSourcesJar()
Expand Down Expand Up @@ -193,7 +196,7 @@ spotless {
// don't need to set target, it is inferred from java

// apply a specific flavor of google-java-format
googleJavaFormat('1.7').aosp()
googleJavaFormat('1.10.0').aosp()
}
}

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
package:
image: azul/zulu-openjdk:11-latest
image: azul/zulu-openjdk:17-latest
tty: true
stdin_open: true
working_dir: /home/package
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 3 additions & 2 deletions src/test/java/com/meilisearch/integration/ClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.meilisearch.sdk.exceptions.MeilisearchException;
import com.meilisearch.sdk.model.*;
import com.meilisearch.sdk.utils.Movie;
import java.lang.reflect.InaccessibleObjectException;
import java.lang.reflect.Modifier;
import org.junit.jupiter.api.*;

Expand Down Expand Up @@ -320,8 +321,8 @@ public void testTransientFieldExclusion() throws MeilisearchException {
Gson gsonWithTransient =
new GsonBuilder().excludeFieldsWithModifiers(Modifier.STATIC).create();

// TODO: Throws StackOverflowError on JDK 1.8, but InaccessibleObjectException on JDK9+
Assertions.assertThrows(StackOverflowError.class, () -> gsonWithTransient.toJson(test));
Assertions.assertThrows(
InaccessibleObjectException.class, () -> gsonWithTransient.toJson(test));
Assertions.assertDoesNotThrow(() -> gson.toJson(test));
}
}