Skip to content

Commit e15d839

Browse files
Merge branch 'publish'
# Conflicts: # CHANGELOG.md
2 parents 2191d94 + fbcb728 commit e15d839

File tree

12 files changed

+239
-82
lines changed

12 files changed

+239
-82
lines changed

.gitlab-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# https://docs.gitlab.com/ci/yaml/
22

3-
# Default image for linux builds
4-
# This should match the image used to build the JVM database libraries (so Address Sanitizer library matches)
5-
image: objectboxio/buildenv-core:2024-07-11 # With JDK 17
3+
# Default Docker image (currently only supporting Docker Linux containers)
4+
# This should match the image used to build the JVM database libraries (so Address Sanitizer library matches).
5+
# When updating, check if the test-jdk jobs need changing.
6+
image: objectboxio/buildenv-core:2025-07-03 # With JDK 21
67

78
# Assumes these environment variables are configured in GitLab CI/CD Settings:
89
# - OBX_READ_PACKAGES_TOKEN
@@ -110,7 +111,6 @@ test-macos:
110111
tags:
111112
- jdk
112113
- mac
113-
- x64
114114
script: ./gradlew $GITLAB_REPO_ARGS $VERSION_ARGS clean build
115115

116116
# Address sanitizer is only available on Linux runners (see script).
@@ -138,12 +138,12 @@ test-jdk-8:
138138
variables:
139139
TEST_JDK: 8
140140

141-
# JDK 17 is the default of the current build image, so test the latest LTS JDK 21
142-
test-jdk-21:
141+
# JDK 21 is the default of the current build image, so test the latest LTS JDK 25
142+
test-jdk-25:
143143
extends: .test-asan-template
144144
needs: ["test-jdk-8"]
145145
variables:
146-
TEST_JDK: 21
146+
TEST_JDK: 25
147147

148148
test-jdk-x86:
149149
extends: .test-template

CHANGELOG.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,80 @@ Notable changes to the ObjectBox Java library.
44

55
For more insights into what changed in the database libraries, [check the ObjectBox C changelog](https://github.com/objectbox/objectbox-c/blob/main/CHANGELOG.md).
66

7+
## 5.3.0 - 2026-03-10
8+
9+
- Gradle plugin: to apply the plugin, it is no longer necessary to add a manual mapping of the plugin ID in your
10+
projects Gradle settings file. This was resolved by publishing Gradle plugin marker artifacts.
11+
[#960](https://github.com/objectbox/objectbox-java/issues/960)
12+
- Gradle plugin: it is no longer necessary to apply the plugin after the dependencies block when manually including
13+
ObjectBox dependencies.
14+
- Update database libraries for Android and JVM to database version `5.2.0-next-2026-03-10`
15+
- (Minor) performance improvements of HNSW vector search on Linux ARM targets
16+
17+
### Sync
18+
19+
- Sync protocol version 10
20+
- SyncClient: support updating filter variables. After login, stage updates using put and remove, then schedule to send
21+
them to the server with `applyFilterVariables()`.
22+
- Update client sync filters variables when online
23+
- Clients report errors to the server
24+
25+
### Migration instructions
26+
27+
#### Drop the Gradle plugin ID mapping
28+
29+
If your `settings.gradle.kts` or `settings.gradle` file contains lines similar to:
30+
31+
```kotlin
32+
pluginManagement {
33+
repositories {
34+
mavenCentral()
35+
}
36+
37+
resolutionStrategy {
38+
eachPlugin {
39+
if (requested.id.id == "io.objectbox") {
40+
useModule("io.objectbox:objectbox-gradle-plugin:${requested.version}")
41+
}
42+
}
43+
}
44+
}
45+
```
46+
47+
Update them to remove the plugin mapping configuration:
48+
49+
```kotlin
50+
pluginManagement {
51+
repositories {
52+
mavenCentral()
53+
}
54+
}
55+
```
56+
57+
#### Apply the plugin using plugins syntax
58+
59+
If your build scripts are applying the plugin after the dependencies block similar to:
60+
61+
```kotlin
62+
dependencies {
63+
// ...
64+
}
65+
66+
apply(plugin = "io.objectbox")
67+
```
68+
69+
Change them to apply the plugin using plugins syntax:
70+
71+
```kotlin
72+
plugins {
73+
id("io.objectbox")
74+
}
75+
76+
dependencies {
77+
// ...
78+
}
79+
```
80+
781
## 5.2.0 - 2026-02-16
882

983
- The [ObjectBox Gradle plugin](https://github.com/objectbox/objectbox-java-generator) requires JDK 11 and Android

README.md

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,15 @@ When using a [TOML version catalog](https://docs.gradle.org/current/userguide/ve
145145
# gradle/libs.versions.toml
146146

147147
[versions]
148-
# Define a variable for the version of the plugin
149-
objectbox = "5.2.0"
150-
151148
# For an Android project
152-
agp = "<AGP_VERSION>"
153-
149+
agp = "AGP_VERSION"
154150
# If using Kotlin
155-
kotlin = "<KOTLIN_VERSION>"
151+
kotlin = "KOTLIN_VERSION"
156152

157-
[plugins]
158-
# Add an alias for the plugin
159-
objectbox = { id = "io.objectbox", version.ref = "objectbox" }
153+
# Define a variable for the version of the ObjectBox plugin
154+
objectbox = "5.3.0"
160155

156+
[plugins]
161157
# For an Android project, using Android Gradle Plugin 9.0 or newer
162158
android-application = { id = "com.android.application", version.ref = "agp" }
163159
kotlin-kapt = { id = "com.android.legacy-kapt", version.ref = "agp" }
@@ -170,15 +166,15 @@ kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
170166
# For a JVM project, if using Kotlin
171167
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
172168
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
169+
170+
# Add an alias for the ObjectBox plugin
171+
objectbox = { id = "io.objectbox", version.ref = "objectbox" }
173172
```
174173

175174
```kotlin
176175
// build.gradle.kts
177176

178177
plugins {
179-
// Add the plugin
180-
alias(libs.plugins.objectbox) apply false
181-
182178
// For an Android project, using Android Gradle Plugin 9.0 or newer
183179
alias(libs.plugins.android.application) apply false
184180
alias(libs.plugins.kotlin.kapt) apply false
@@ -191,6 +187,9 @@ plugins {
191187
// For a JVM project, if using Kotlin
192188
alias(libs.plugins.kotlin.jvm) apply false
193189
alias(libs.plugins.kotlin.kapt) apply false
190+
191+
// Add the ObjectBox plugin
192+
alias(libs.plugins.objectbox) apply false
194193
}
195194

196195
allprojects {
@@ -209,14 +208,13 @@ pluginManagement {
209208
// Add Maven Central to the plugin repositories
210209
mavenCentral()
211210
}
212-
213-
resolutionStrategy {
214-
eachPlugin {
215-
// Map the plugin ID to the Maven artifact
216-
if (requested.id.id == "io.objectbox") {
217-
useModule("io.objectbox:objectbox-gradle-plugin:${requested.version}")
218-
}
219-
}
211+
}
212+
213+
dependencyResolutionManagement {
214+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
215+
repositories {
216+
// Add Maven Central to the dependency repositories
217+
mavenCentral()
220218
}
221219
}
222220
```
@@ -242,7 +240,7 @@ plugins {
242240
alias(libs.plugins.kotlin.jvm)
243241
alias(libs.plugins.kotlin.kapt)
244242

245-
// Finally, apply the plugin
243+
// Finally, apply the ObjectBox plugin
246244
alias(libs.plugins.objectbox)
247245
}
248246
```
@@ -259,8 +257,8 @@ Your project can now use ObjectBox, continue by [defining entity classes](https:
259257
// build.gradle.kts
260258

261259
plugins {
262-
// Add the plugin
263-
id("io.objectbox") version "5.2.0" apply false
260+
// Add the ObjectBox plugin
261+
id("io.objectbox") version "5.3.0" apply false
264262
}
265263

266264
allprojects {
@@ -279,14 +277,13 @@ pluginManagement {
279277
// Add Maven Central to the plugin repositories
280278
mavenCentral()
281279
}
280+
}
282281

283-
resolutionStrategy {
284-
eachPlugin {
285-
// Map the plugin ID to the Maven artifact
286-
if (requested.id.id == "io.objectbox") {
287-
useModule("io.objectbox:objectbox-gradle-plugin:${requested.version}")
288-
}
289-
}
282+
dependencyResolutionManagement {
283+
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
284+
repositories {
285+
// Add Maven Central to the dependency repositories
286+
mavenCentral()
290287
}
291288
}
292289
```
@@ -299,16 +296,16 @@ pluginManagement {
299296
// build.gradle.kts
300297

301298
buildscript {
302-
// Define a variable for the plugin version
303-
val objectboxVersion by extra("5.2.0")
299+
// Define a variable for the ObjectBox plugin version
300+
val objectboxVersion by extra("5.3.0")
304301

305302
repositories {
306303
// Add Maven Central to the plugin repositories
307304
mavenCentral()
308305
}
309306

310307
dependencies {
311-
// Add the plugin
308+
// Add the ObjectBox plugin
312309
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
313310
}
314311
}
@@ -329,16 +326,16 @@ allprojects {
329326
// build.gradle
330327
331328
buildscript {
332-
// Define a variable for the plugin version
333-
ext.objectboxVersion = "5.2.0"
329+
// Define a variable for the ObjectBox plugin version
330+
ext.objectboxVersion = "5.3.0"
334331
335332
repositories {
336333
// Add Maven Central to the plugin repositories
337334
mavenCentral()
338335
}
339336
340337
dependencies {
341-
// Add the plugin
338+
// Add the ObjectBox plugin
342339
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
343340
}
344341
}
@@ -374,7 +371,7 @@ plugins {
374371
id("org.jetbrains.kotlin.jvm") // or kotlin("jvm")
375372
id("org.jetbrains.kotlin.kapt") // or kotlin("kapt")
376373

377-
// Finally, apply the plugin
374+
// Finally, apply the ObjectBox plugin
378375
id("io.objectbox")
379376
}
380377
```

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins {
2020
buildscript {
2121
// Version of Maven artifacts
2222
// Should only be changed as part of the release process, see the release checklist in the objectbox repo
23-
val versionNumber = "5.2.0"
23+
val versionNumber = "5.3.0"
2424

2525
// Release mode should only be enabled when manually triggering a CI pipeline,
2626
// see the release checklist in the objectbox repo.

objectbox-java/build.gradle.kts

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import kotlin.io.path.appendText
2-
import kotlin.io.path.readText
3-
import kotlin.io.path.writeText
4-
51
plugins {
62
id("java-library")
73
id("objectbox-publish")
@@ -69,9 +65,20 @@ val javadocForWeb by tasks.registering(Javadoc::class) {
6965
group = "documentation"
7066
description = "Builds Javadoc incl. objectbox-java-api classes with web tweaks."
7167

68+
// Register used files as inputs so task is re-run if they change
69+
// https://docs.gradle.org/current/userguide/incremental_build.html
70+
val customOverview = layout.projectDirectory.file("src/web/overview.html")
71+
inputs.file(customOverview)
72+
.withPropertyName("customOverview")
73+
.withPathSensitivity(PathSensitivity.NONE)
74+
val customStylesheet = layout.projectDirectory.file("src/web/objectbox-stylesheet.css")
75+
inputs.file(customStylesheet)
76+
.withPropertyName("customStylesheet")
77+
.withPathSensitivity(PathSensitivity.NONE)
78+
7279
javadocTool.set(javaToolchains.javadocToolFor {
73-
// Note: the style changes only work if using JDK 10+, 17 is the LTS release used to publish this
74-
languageVersion.set(JavaLanguageVersion.of(17))
80+
// Note: the style changes only work if using JDK 10+, 21 is the LTS release used to publish this
81+
languageVersion.set(JavaLanguageVersion.of(21))
7582
})
7683

7784
val srcApi = project(":objectbox-java-api").file("src/main/java/")
@@ -104,33 +111,18 @@ val javadocForWeb by tasks.registering(Javadoc::class) {
104111
source = filteredSources + fileTree(srcApi)
105112

106113
classpath = sourceSets.main.get().output + sourceSets.main.get().compileClasspath
107-
setDestinationDir(javadocForWebDir.get().asFile)
114+
destinationDir = javadocForWebDir.get().asFile
108115

109116
title = "ObjectBox Java ${project.version} API"
110117
(options as StandardJavadocDocletOptions).apply {
111-
overview = "$projectDir/src/web/overview.html"
112-
bottom = "Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2017-2025 <a href=\"https://objectbox.io/\">ObjectBox Ltd</a>. All Rights Reserved.</i>"
118+
overview = customOverview.toString()
119+
bottom = "Available under the Apache License, Version 2.0 - <i>Copyright &#169; 2017-2026 <a href=\"https://objectbox.io/\">ObjectBox Ltd</a>. All Rights Reserved.</i>"
120+
// Customize the default stylesheet https://docs.oracle.com/en/java/javase/21/javadoc/javadoc-css-themes.html
121+
// Note: the javadoc option is "--add-stylesheet", but addStringOption already ads a single dash ("-")
122+
addStringOption("-add-stylesheet", customStylesheet.toString())
113123
}
114124

115125
doLast {
116-
// Note: frequently check the vanilla stylesheet.css if values still match.
117-
val stylesheetPath = "$destinationDir/stylesheet.css"
118-
119-
// Adjust the CSS stylesheet
120-
121-
// Change some color values
122-
// The stylesheet file should be megabytes at most, so read it as a whole
123-
val stylesheetFile = kotlin.io.path.Path(stylesheetPath)
124-
val originalContent = stylesheetFile.readText()
125-
val replacedContent = originalContent
126-
.replace("#4D7A97", "#17A6A6") // Primary background
127-
.replace("#F8981D", "#7DDC7D") // "Active" background
128-
.replace("#bb7a2a", "#E61955") // Hover
129-
stylesheetFile.writeText(replacedContent)
130-
// Note: in CSS stylesheets the last added rule wins, so append to default stylesheet.
131-
// Make code blocks scroll instead of stick out on small width
132-
stylesheetFile.appendText("pre {\n overflow-x: auto;\n}\n")
133-
134126
println("Javadoc for web created at $destinationDir")
135127
}
136128
}

objectbox-java/src/main/java/io/objectbox/BoxStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class BoxStore implements Closeable {
8282
* ReLinker uses this as a suffix for the extracted shared library file. If different, it will update it. Should be
8383
* unique to avoid conflicts.
8484
*/
85-
public static final String JNI_VERSION = "5.1.1-2026-02-16";
85+
public static final String JNI_VERSION = "5.2.0-2026-03-10";
8686

8787
/**
8888
* The ObjectBox database version this Java library is known to work with.
@@ -92,7 +92,7 @@ public class BoxStore implements Closeable {
9292
* This is used (currently only in tests) to make sure a database library has a compatible JNI API by checking the
9393
* version number matches exactly and the date is the same or newer.
9494
*/
95-
private static final String VERSION = "5.1.1-2026-02-16";
95+
private static final String VERSION = "5.2.0-2026-03-10";
9696

9797
private static final String OBJECTBOX_PACKAGE_NAME = "objectbox";
9898
private static BoxStore defaultStore;

0 commit comments

Comments
 (0)