Skip to content

Commit

Permalink
Prepare release 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greenrobot-team committed Oct 19, 2021
1 parent b5f73aa commit 9d8926c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@
[ObjectBox](https://objectbox.io/) is a superfast object-oriented database with strong relation support.
ObjectBox is embedded into your Android, Linux, macOS, or Windows app.

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

Demo code using ObjectBox:

```kotlin
// Kotlin
val playlist = Playlist("My Favorites")
playlist.songs.add(Song("Lalala"))
playlist.songs.add(Song("Lololo"))
box.put(playlist)
```

```java
// Java
Playlist playlist = new Playlist("My Favorites");
playlist.songs.add(new Song("Lalala"));
playlist.songs.add(new Song("Lololo"));
Expand All @@ -29,27 +38,40 @@ Besides JVM based languages like Java and Kotlin, ObjectBox also offers:

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

```groovy
buildscript {
ext.objectboxVersion = '2.9.1'
ext.objectboxVersion = "3.0.0"
repositories {
mavenCentral()
}
dependencies {
classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
classpath("io.objectbox:objectbox-gradle-plugin:$objectboxVersion")
}
}
```

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

```groovy
apply plugin: 'io.objectbox' // after applying Android plugin
// Using plugins syntax:
plugins {
id("io.objectbox") // Add after other plugins.
}
// Or using the old apply syntax:
apply plugin: "io.objectbox" // Add after other plugins.
```

First steps
-----------
Create data object class `@Entity`, for example "Playlist".
```java
Create a data object class `@Entity`, for example "Playlist".
```
// Kotlin
@Entity data class Playlist( ... )
// Java
@Entity public class Playlist { ... }
```
Now build the project to let ObjectBox generate the class `MyObjectBox` for you.
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext {
// Typically, only edit those two:
def objectboxVersionNumber = '2.9.2' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
def objectboxVersionRelease = false // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions
def objectboxVersionNumber = '3.0.0' // without "-SNAPSHOT", e.g. '2.5.0' or '2.4.0-RC'
def objectboxVersionRelease = true // set to true for releasing to ignore versionPostFix to avoid e.g. "-dev" versions

// version post fix: '-<value>' or '' if not defined; e.g. used by CI to pass in branch name
def versionPostFixValue = project.findProperty('versionPostFix')
Expand Down
4 changes: 2 additions & 2 deletions objectbox-java/src/main/java/io/objectbox/BoxStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public class BoxStore implements Closeable {
@Nullable private static Object relinker;

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

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

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

0 comments on commit 9d8926c

Please sign in to comment.