Skip to content

Commit 9d8926c

Browse files
Prepare release 3.0.0
1 parent b5f73aa commit 9d8926c

File tree

3 files changed

+34
-12
lines changed

3 files changed

+34
-12
lines changed

README.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66
[ObjectBox](https://objectbox.io/) is a superfast object-oriented database with strong relation support.
77
ObjectBox is embedded into your Android, Linux, macOS, or Windows app.
88

9-
**Latest version: [2.9.1 (2021/03/15)](https://docs.objectbox.io/#objectbox-changelog)**
9+
**Latest version: [3.0.0 (2021/10/19)](https://docs.objectbox.io/#objectbox-changelog)**
1010

1111
Demo code using ObjectBox:
1212

13+
```kotlin
14+
// Kotlin
15+
val playlist = Playlist("My Favorites")
16+
playlist.songs.add(Song("Lalala"))
17+
playlist.songs.add(Song("Lololo"))
18+
box.put(playlist)
19+
```
20+
1321
```java
22+
// Java
1423
Playlist playlist = new Playlist("My Favorites");
1524
playlist.songs.add(new Song("Lalala"));
1625
playlist.songs.add(new Song("Lololo"));
@@ -29,27 +38,40 @@ Besides JVM based languages like Java and Kotlin, ObjectBox also offers:
2938

3039
Gradle setup
3140
------------
32-
Add this to your root build.gradle (project level):
41+
For Android projects, add the ObjectBox Gradle plugin to your root `build.gradle`:
3342

3443
```groovy
3544
buildscript {
36-
ext.objectboxVersion = '2.9.1'
45+
ext.objectboxVersion = "3.0.0"
46+
repositories {
47+
mavenCentral()
48+
}
3749
dependencies {
38-
classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
50+
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
3951
}
4052
}
4153
```
4254

43-
And this to our app's build.gradle (module level):
55+
And in your app's `build.gradle` apply the plugin:
4456

4557
```groovy
46-
apply plugin: 'io.objectbox' // after applying Android plugin
58+
// Using plugins syntax:
59+
plugins {
60+
id("io.objectbox") // Add after other plugins.
61+
}
62+
63+
// Or using the old apply syntax:
64+
apply plugin: "io.objectbox" // Add after other plugins.
4765
```
4866

4967
First steps
5068
-----------
51-
Create data object class `@Entity`, for example "Playlist".
52-
```java
69+
Create a data object class `@Entity`, for example "Playlist".
70+
```
71+
// Kotlin
72+
@Entity data class Playlist( ... )
73+
74+
// Java
5375
@Entity public class Playlist { ... }
5476
```
5577
Now build the project to let ObjectBox generate the class `MyObjectBox` for you.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
buildscript {
22
ext {
33
// Typically, only edit those two:
4-
def objectboxVersionNumber = '2.9.2' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
5-
def objectboxVersionRelease = false // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
4+
def objectboxVersionNumber = '3.0.0' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
5+
def objectboxVersionRelease = true // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
66

77
// version post fix: '-<value>' or '' if not defined; e.g. used by CI to pass in branch name
88
def versionPostFixValue = project.findProperty('versionPostFix')

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ public class BoxStore implements Closeable {
6969
@Nullable private static Object relinker;
7070

7171
/** Change so ReLinker will update native library when using workaround loading. */
72-
public static final String JNI_VERSION = "2.9.2-RC4";
72+
public static final String JNI_VERSION = "3.0.0";
7373

74-
private static final String VERSION = "2.9.2-2021-08-19";
74+
private static final String VERSION = "3.0.0-2021-10-18";
7575
private static BoxStore defaultStore;
7676

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

0 commit comments

Comments
 (0)