Skip to content

Commit f5716ea

Browse files
Merge branch 'publish' into dev
2 parents 1fdc93c + 1e9a7a6 commit f5716ea

4 files changed

Lines changed: 110 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Notable changes to the ObjectBox Java library.
44

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

7-
## Next release
7+
## 5.1.0 - 2026-01-26
88

99
- Add [ObjectBoxThreadPoolExecutor](objectbox-java/src/main/java/io/objectbox/ObjectBoxThreadPoolExecutor.java), a
1010
default implementation of a `ThreadPoolExecutor` that properly cleans up thread-local Box resources.
@@ -14,6 +14,18 @@ For more insights into what changed in the ObjectBox C++ core, [check the Object
1414
for `BoxStore` to help create common coroutine dispatchers backed by an `ObjectBoxThreadPoolExecutor`.
1515
- `BoxStore.runInTx` and `callInTx` close a write cursor even if the runnable or callable throws. This would previously
1616
result in cursor not closed warnings when the cursor was closed by the finalizer daemon.
17+
- `BoxStore` no longer gets stuck while closing when deleting transactions created in other threads with open relation
18+
cursors.
19+
- Admin: the Schema view now shows if external name of types and properties if configured.
20+
- Admin: the Schema view now shows the type as text (e.g. "String") instead of the internal type ID.
21+
22+
### Sync
23+
24+
- New Sync protocol V8: using new clients also requires a server update
25+
- Remove superfluous sync listener triggers when sync filters "report updates" (SKIP_TX)
26+
- Sync clients compress earlier: reduces disk storage for outgoing data
27+
- Reworked certificates for Apple platforms
28+
- Removed support for older Sync protocol versions before 2024-09; protocol V5+ is now required.
1729

1830
## 5.0.1 - 2025-09-30
1931

README.md

Lines changed: 95 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,10 @@ box.put(person) // Update
8383
box.remove(person) // Delete
8484
```
8585

86-
Continue with the ➡️ **[Getting Started guide](https://docs.objectbox.io/getting-started)**.
87-
8886
## Table of Contents
8987

9088
- [Key Features](#key-features)
91-
- [Getting started](#getting-started)
89+
- [Getting Started](#getting-started)
9290
- [Gradle setup](#gradle-setup)
9391
- [Maven setup](#maven-setup)
9492
- [Why use ObjectBox?](#why-use-objectbox-for-java-data-management)
@@ -105,32 +103,75 @@ Continue with the ➡️ **[Getting Started guide](https://docs.objectbox.io/get
105103
🔗 **[Built-in Object Relations](https://docs.objectbox.io/relations):** built-in support for object relations, allowing you to easily establish and manage relationships between objects.\
106104
👌 **Ease of use:** concise API that eliminates the need for complex SQL queries, saving you time and effort during development.
107105

108-
## Getting started
106+
## Getting Started
107+
108+
> [!NOTE]
109+
> Prefer to look at example code? Check out [our examples repository](https://github.com/objectbox/objectbox-examples).
110+
111+
You can add the ObjectBox Java SDK to your project using:
112+
113+
- a [Gradle setup](#gradle-setup)
114+
- a [Maven setup](#maven-setup)
115+
116+
ObjectBox tools and dependencies are available on [the Maven Central repository](https://central.sonatype.com/namespace/io.objectbox).
117+
118+
The database libraries available for the ObjectBox Java SDK support:
119+
120+
- JVM 8 or newer
121+
- Linux (x64, arm64, armv7)
122+
- macOS (x64, arm64)
123+
- Windows (x64)
124+
- Android 5.0 (API level 21) or newer
125+
126+
The APIs and tools of the ObjectBox Java SDK support:
127+
128+
- Java 8 or newer
129+
- Kotlin 1.7 or newer
130+
- Android Gradle Plugin 8.0 or newer
109131

110132
### Gradle setup
111133

112-
For Gradle projects, add the ObjectBox Gradle plugin to your root Gradle script:
134+
For Gradle projects, add the ObjectBox Gradle plugin to your root Gradle script.
135+
136+
When using a TOML version catalog and plugins syntax (for alternatives see below):
137+
138+
```toml
139+
# gradle/libs.versions.toml
140+
[versions]
141+
objectbox = "5.1.0"
142+
143+
[plugins]
144+
objectbox = { id = "io.objectbox", version.ref = "objectbox" }
145+
```
113146

114147
```kotlin
115148
// build.gradle.kts
116-
buildscript {
117-
val objectboxVersion by extra("5.0.1")
118-
repositories {
119-
mavenCentral()
120-
}
121-
dependencies {
122-
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
149+
plugins {
150+
alias(libs.plugins.objectbox) apply false
151+
}
152+
```
153+
154+
```kotlin
155+
// settings.gradle.kts
156+
pluginManagement {
157+
resolutionStrategy {
158+
eachPlugin {
159+
if (requested.id.id == "io.objectbox") {
160+
useModule("io.objectbox:objectbox-gradle-plugin:${requested.version}")
161+
}
162+
}
123163
}
124164
}
125165
```
126166

167+
Alternatives:
168+
127169
<details><summary>Using plugins syntax</summary>
128170

129171
```kotlin
130172
// build.gradle.kts
131173
plugins {
132-
id("com.android.application") version "8.0.2" apply false // When used in an Android project
133-
id("io.objectbox") version "5.0.1" apply false
174+
id("io.objectbox") version "5.1.0" apply false
134175
}
135176
```
136177

@@ -149,12 +190,29 @@ pluginManagement {
149190

150191
</details>
151192

152-
<details><summary>Using Groovy syntax</summary>
193+
<details><summary>Using buildscript syntax (KTS)</summary>
194+
195+
```kotlin
196+
// build.gradle.kts
197+
buildscript {
198+
val objectboxVersion by extra("5.1.0")
199+
repositories {
200+
mavenCentral()
201+
}
202+
dependencies {
203+
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
204+
}
205+
}
206+
```
207+
208+
</details>
209+
210+
<details><summary>Using buildscript syntax (Groovy)</summary>
153211

154212
```groovy
155213
// build.gradle
156214
buildscript {
157-
ext.objectboxVersion = "5.0.1"
215+
ext.objectboxVersion = "5.1.0"
158216
repositories {
159217
mavenCentral()
160218
}
@@ -166,19 +224,33 @@ buildscript {
166224

167225
</details>
168226

169-
And in the Gradle script of your subproject apply the plugin:
227+
Then, in the Gradle script of your subproject apply the plugin:
228+
229+
```kotlin
230+
// app/build.gradle.kts
231+
plugins {
232+
alias(libs.plugins.android.application) // When used in an Android project
233+
alias(libs.plugins.kotlin.android) // When used in an Android project
234+
alias(libs.plugins.kotlin.kapt) // When used in an Android or Kotlin project
235+
alias(libs.plugins.objectbox) // Add after other plugins
236+
}
237+
```
238+
239+
<details><summary>Alternative: when not using a version catalog, using the plugin id</summary>
170240

171241
```kotlin
172242
// app/build.gradle.kts
173243
plugins {
174244
id("com.android.application") // When used in an Android project
175245
kotlin("android") // When used in an Android project
176-
kotlin("kapt")
246+
kotlin("kapt") // When used in an Android or Kotlin project
177247
id("io.objectbox") // Add after other plugins
178248
}
179249
```
180250

181-
Then sync the Gradle project with your IDE.
251+
</details>
252+
253+
Finally, sync the Gradle project with your IDE (for ex. using "Sync Project with Gradle Files" in Android Studio).
182254

183255
Your project can now use ObjectBox, continue by [defining entity classes](https://docs.objectbox.io/getting-started#define-entity-classes).
184256

@@ -188,6 +260,10 @@ This is currently only supported for JVM projects.
188260

189261
To set up a Maven project, see the [README of the Java Maven example project](https://github.com/objectbox/objectbox-examples/blob/main/java-main-maven/README.md).
190262

263+
## Frequently Asked Questions and Troubleshooting
264+
265+
If you encounter any problems, check out the [FAQ](https://docs.objectbox.io/faq) and [Troubleshooting](https://docs.objectbox.io/troubleshooting) pages.
266+
191267
## Why use ObjectBox for Java data management?
192268

193269
ObjectBox is a NoSQL Java database designed for local data storage on resource-restricted devices, prioritizing

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.0.2"
23+
val versionNumber = "5.1.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/src/main/java/io/objectbox/BoxStore.java

Lines changed: 1 addition & 1 deletion
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.0.0-2025-09-27";
85+
public static final String JNI_VERSION = "5.1.0-2026-01-19";
8686

8787
/** The ObjectBox database version this Java library is known to work with. */
8888
private static final String VERSION = "5.1.1-dev-2026-01-21";

0 commit comments

Comments
 (0)