You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+93-17Lines changed: 93 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,12 +83,10 @@ box.put(person) // Update
83
83
box.remove(person) // Delete
84
84
```
85
85
86
-
Continue with the ➡️ **[Getting Started guide](https://docs.objectbox.io/getting-started)**.
87
-
88
86
## Table of Contents
89
87
90
88
-[Key Features](#key-features)
91
-
-[Getting started](#getting-started)
89
+
-[Getting Started](#getting-started)
92
90
-[Gradle setup](#gradle-setup)
93
91
-[Maven setup](#maven-setup)
94
92
-[Why use ObjectBox?](#why-use-objectbox-for-java-data-management)
@@ -105,31 +103,74 @@ Continue with the ➡️ **[Getting Started guide](https://docs.objectbox.io/get
105
103
🔗 **[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.\
106
104
👌 **Ease of use:** concise API that eliminates the need for complex SQL queries, saving you time and effort during development.
107
105
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
109
131
110
132
### Gradle setup
111
133
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" }
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>
170
240
171
241
```kotlin
172
242
// app/build.gradle.kts
173
243
plugins {
174
244
id("com.android.application") // When used in an Android project
175
245
kotlin("android") // When used in an Android project
176
-
kotlin("kapt")
246
+
kotlin("kapt")// When used in an Android or Kotlin project
177
247
id("io.objectbox") // Add after other plugins
178
248
}
179
249
```
180
250
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).
182
254
183
255
Your project can now use ObjectBox, continue by [defining entity classes](https://docs.objectbox.io/getting-started#define-entity-classes).
184
256
@@ -188,6 +260,10 @@ This is currently only supported for JVM projects.
188
260
189
261
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).
190
262
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
+
191
267
## Why use ObjectBox for Java data management?
192
268
193
269
ObjectBox is a NoSQL Java database designed for local data storage on resource-restricted devices, prioritizing
0 commit comments