-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathbuild.gradle.kts
38 lines (30 loc) · 1.1 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// See the root build script on how to add plugins and repositories.
plugins {
id("application")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
tasks.withType<JavaCompile> {
// Note: Gradle defaults to the platform default encoding, make sure to always use UTF-8.
options.encoding = "UTF-8"
}
tasks.named<JavaExec>("run") {
// Let Gradle run accept console input
standardInput = System.`in`
}
application {
mainClass.set("io.objectbox.example.Main")
}
val objectboxVersion: String by rootProject.extra
dependencies {
// Optional: include all native libraries for distribution
// (only the one for the current platform is added by the plugin).
implementation("io.objectbox:objectbox-sync-windows:$objectboxVersion")
implementation("io.objectbox:objectbox-sync-linux:$objectboxVersion")
implementation("io.objectbox:objectbox-sync-macos:$objectboxVersion")
}
// Apply the plugin after the dependencies block so it detects added
// ObjectBox dependencies and does not replace them.
apply(plugin = "io.objectbox.sync")