Skip to content

Commit 774a27a

Browse files
Prepare Java release 4.2.0
1 parent 49f17d8 commit 774a27a

File tree

4 files changed

+17
-14
lines changed

4 files changed

+17
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 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-
## 4.1.1 - in development
7+
## 4.2.0 - 2025-03-04
88

99
- Add new query conditions `equalKeyValue`, `greaterKeyValue`, `lessKeyValue`, `lessOrEqualKeyValue`, and
1010
`greaterOrEqualKeyValue` that are helpful to write complex queries for [string maps](https://docs.objectbox.io/advanced/custom-types#flex-properties).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ For Android projects, add the ObjectBox Gradle plugin to your root `build.gradle
7777

7878
```groovy
7979
buildscript {
80-
ext.objectboxVersion = "4.1.0"
80+
ext.objectboxVersion = "4.2.0"
8181
repositories {
8282
mavenCentral()
8383
}

build.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ plugins {
1313
}
1414

1515
buildscript {
16-
// To publish a release, typically, only edit those two:
17-
val objectboxVersionNumber = "4.1.1" // without "-SNAPSHOT", e.g. "2.5.0" or "2.4.0-RC"
18-
val objectboxVersionRelease =
19-
false // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
16+
val versionNumber = "4.2.0" // without "-SNAPSHOT", e.g. "2.5.0" or "2.4.0-RC"
17+
val isRelease = true // WARNING: only set true to publish a release on publish branch!
18+
// See the release checklist for details.
19+
// Makes this produce release artifacts, changes dependencies to release versions.
2020

2121
// version post fix: "-<value>" or "" if not defined; e.g. used by CI to pass in branch name
2222
val versionPostFixValue = project.findProperty("versionPostFix")
2323
val versionPostFix = if (versionPostFixValue != null) "-$versionPostFixValue" else ""
24-
val obxJavaVersion by extra(objectboxVersionNumber + (if (objectboxVersionRelease) "" else "$versionPostFix-SNAPSHOT"))
24+
val obxJavaVersion by extra(versionNumber + (if (isRelease) "" else "$versionPostFix-SNAPSHOT"))
2525

2626
// Native library version for tests
2727
// Be careful to diverge here; easy to forget and hard to find JNI problems
28-
val nativeVersion = objectboxVersionNumber + (if (objectboxVersionRelease) "" else "-dev-SNAPSHOT")
28+
val nativeVersion = versionNumber + (if (isRelease) "" else "-dev-SNAPSHOT")
2929
val osName = System.getProperty("os.name").lowercase()
3030
val objectboxPlatform = when {
3131
osName.contains("linux") -> "linux"
@@ -54,8 +54,8 @@ buildscript {
5454
// prevent uploading from branches other than publish, and main (for which uploading is turned off).
5555
val isCI = System.getenv("CI") == "true"
5656
val branchOrTag = System.getenv("CI_COMMIT_REF_NAME")
57-
if (isCI && objectboxVersionRelease && !("publish" == branchOrTag || "main" == branchOrTag)) {
58-
throw GradleException("objectboxVersionRelease = true is only allowed on branch publish or main")
57+
if (isCI && isRelease && !("publish" == branchOrTag || "main" == branchOrTag)) {
58+
throw GradleException("isRelease = true is only allowed on branch publish or main")
5959
}
6060

6161
repositories {

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,14 @@ public class BoxStore implements Closeable {
7373
/** Prefix supplied with database directory to signal a file-less and in-memory database should be used. */
7474
public static final String IN_MEMORY_PREFIX = "memory:";
7575

76-
/** ReLinker uses this as a suffix for the extracted shared library file. If different, it will update it. */
77-
public static final String JNI_VERSION = "4.1.0-2025-01-30";
76+
/**
77+
* ReLinker uses this as a suffix for the extracted shared library file. If different, it will update it. Should be
78+
* unique to avoid conflicts.
79+
*/
80+
public static final String JNI_VERSION = "4.2.0-2025-03-04";
7881

79-
/** The native or core version of ObjectBox the Java library is known to work with. */
80-
private static final String VERSION = "4.1.0-2025-01-30";
82+
/** The ObjectBox database version this Java library is known to work with. */
83+
private static final String VERSION = "4.2.0-2025-03-04";
8184
private static BoxStore defaultStore;
8285

8386
/** Currently used DB dirs with values from {@link #getCanonicalPath(File)}. */

0 commit comments

Comments
 (0)