Skip to content

Commit 922adf1

Browse files
Merge branch 'kotlin-1.4-compat' into 'dev'
Make objectbox-kotlin compilable by Kotlin 1.4 See merge request objectbox/objectbox-java!126
2 parents 618c960 + 07a35d7 commit 922adf1

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

build.gradle.kts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ buildscript {
3838
val essentialsVersion by extra("3.1.0")
3939
val junitVersion by extra("4.13.2")
4040
val mockitoVersion by extra("3.8.0")
41-
val kotlinVersion by extra("1.7.20")
42-
val coroutinesVersion by extra("1.6.4")
43-
val dokkaVersion by extra("1.7.20")
41+
// The versions of Kotlin, Kotlin Coroutines and Dokka must work together.
42+
// Check https://github.com/Kotlin/kotlinx.coroutines#readme
43+
// and https://github.com/Kotlin/dokka/releases
44+
val kotlinVersion by extra("1.8.20")
45+
val coroutinesVersion by extra("1.7.3")
46+
val dokkaVersion by extra("1.8.20")
4447

4548
println("version=$obxJavaVersion")
4649
println("objectboxNativeDependency=$obxJniLibVersion")

objectbox-kotlin/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ tasks.withType(JavaCompile).configureEach {
1414
options.release.set(8)
1515
}
1616

17-
// Produce Java 8 byte code, would default to Java 6.
1817
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
1918
kotlinOptions {
19+
// Produce Java 8 byte code, would default to Java 6.
2020
jvmTarget = "1.8"
21+
// Try to use APIs at most one version newer than lowest supported (notably by Gradle plugin).
22+
// Note: Kotlin is able to compile with binaries up to one later version.
23+
apiVersion = "1.5"
2124
}
2225
}
2326

objectbox-rxjava3/src/main/java/io/objectbox/rx3/Query.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import io.reactivex.rxjava3.core.Single
99
/**
1010
* Shortcut for [`RxQuery.flowableOneByOne(query, strategy)`][RxQuery.flowableOneByOne].
1111
*/
12-
fun <T> Query<T>.flowableOneByOne(strategy: BackpressureStrategy = BackpressureStrategy.BUFFER): Flowable<T> {
12+
fun <T : Any> Query<T>.flowableOneByOne(strategy: BackpressureStrategy = BackpressureStrategy.BUFFER): Flowable<T> {
1313
return RxQuery.flowableOneByOne(this, strategy)
1414
}
1515

0 commit comments

Comments
 (0)