GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move Rx3 Kotlin extensions to Rx3 module. · jamestiotio/objectbox-java@59f7b08

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • build.gradle
  • objectbox-kotlin
    • build.gradle
  • objectbox-rxjava3
    • build.gradle
    • src
      • main/java/io/objectbox/rx3
        • Query.kt
      • test/java/io/objectbox/rx3
        • QueryKtxTest.kt
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎build.gradle‎

Copy file name to clipboardExpand all lines: build.gradle
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ buildscript {
2121

2222
junit_version = '4.13'
2323
mockito_version = '3.3.3'
24+
kotlin_version = '1.3.61'
25+
dokka_version = '0.10.1'
2426

2527
println "version=$ob_version"
2628
println "objectboxNativeDependency=$ob_native_dep"
@@ -35,6 +37,8 @@ buildscript {
3537
}
3638

3739
dependencies {
40+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
41+
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
3842
classpath "gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.0.5"
3943
}
4044
}
Collapse file

‎objectbox-kotlin/build.gradle‎

Copy file name to clipboardExpand all lines: objectbox-kotlin/build.gradle
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
buildscript {
22
ext.javadocDir = "$buildDir/docs/javadoc"
3-
ext.kotlin_version = '1.3.61'
4-
ext.dokka_version = '0.10.1'
5-
6-
repositories {
7-
mavenCentral()
8-
jcenter()
9-
}
10-
11-
dependencies {
12-
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13-
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
14-
}
153
}
164

175
apply plugin: 'kotlin'
Collapse file

‎objectbox-rxjava3/build.gradle‎

Copy file name to clipboardExpand all lines: objectbox-rxjava3/build.gradle
+33-2Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,50 @@
1+
buildscript {
2+
ext.javadocDir = "$buildDir/docs/javadoc"
3+
}
4+
15
apply plugin: 'java'
6+
apply plugin: 'kotlin'
7+
apply plugin: 'org.jetbrains.dokka'
28

39
sourceCompatibility = JavaVersion.VERSION_1_8
410
targetCompatibility = JavaVersion.VERSION_1_8
511

12+
// Produce Java 8 byte code, would default to Java 6.
13+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
14+
kotlinOptions {
15+
jvmTarget = "1.8"
16+
}
17+
}
18+
19+
dokka {
20+
outputFormat = 'html'
21+
outputDirectory = javadocDir
22+
23+
// Fix "Can't find node by signature": have to manually point to dependencies.
24+
// https://github.com/Kotlin/dokka/wiki/faq#dokka-complains-about-cant-find-node-by-signature-
25+
configuration{
26+
externalDocumentationLink {
27+
// Point to web javadoc for objectbox-java packages.
28+
url = new URL("https://objectbox.io/docfiles/java/current/")
29+
// Note: Using JDK 9+ package-list is now called element-list.
30+
packageListUrl = new URL(url, "element-list")
31+
}
32+
}
33+
}
34+
635
dependencies {
736
compile project(':objectbox-java')
837
compile 'io.reactivex.rxjava3:rxjava:3.0.1'
38+
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
939

40+
testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
1041
testCompile "junit:junit:$junit_version"
1142
testCompile "org.mockito:mockito-core:$mockito_version"
1243
}
1344

14-
task javadocJar(type: Jar, dependsOn: javadoc) {
45+
task javadocJar(type: Jar, dependsOn: dokka) {
1546
classifier = 'javadoc'
16-
from 'build/docs/javadoc'
47+
from "$javadocDir"
1748
}
1849

1950
task sourcesJar(type: Jar) {
Collapse file

‎…main/kotlin/io/objectbox/kotlin/Query.kt‎ ‎…/src/main/java/io/objectbox/rx3/Query.kt‎objectbox-kotlin/src/main/kotlin/io/objectbox/kotlin/Query.kt renamed to objectbox-rxjava3/src/main/java/io/objectbox/rx3/Query.kt objectbox-kotlin/src/main/kotlin/io/objectbox/kotlin/Query.kt renamed to objectbox-rxjava3/src/main/java/io/objectbox/rx3/Query.kt

Copy file name to clipboardExpand all lines: objectbox-rxjava3/src/main/java/io/objectbox/rx3/Query.kt
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package io.objectbox.kotlin
1+
package io.objectbox.rx3
22

33
import io.objectbox.query.Query
4-
import io.objectbox.rx3.RxQuery
54
import io.reactivex.rxjava3.core.BackpressureStrategy
65
import io.reactivex.rxjava3.core.Flowable
76
import io.reactivex.rxjava3.core.Observable
Collapse file

‎objectbox-rxjava3/src/test/java/io/objectbox/rx3/QueryKtxTest.kt‎

Copy file name to clipboard
+30Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.objectbox.rx3
2+
3+
import io.objectbox.query.Query
4+
import org.junit.Assert.assertNotNull
5+
import org.junit.Test
6+
import org.junit.runner.RunWith
7+
import org.mockito.Mockito
8+
import org.mockito.junit.MockitoJUnitRunner
9+
10+
@RunWith(MockitoJUnitRunner::class)
11+
class QueryKtxTest {
12+
13+
@Test
14+
fun flowableFromQuery() {
15+
val observable = Mockito.mock(Query::class.java).flowableOneByOne()
16+
assertNotNull(observable)
17+
}
18+
19+
@Test
20+
fun observableFromQuery() {
21+
val observable = Mockito.mock(Query::class.java).observable()
22+
assertNotNull(observable)
23+
}
24+
25+
@Test
26+
fun singleFromQuery() {
27+
val observable = Mockito.mock(Query::class.java).single()
28+
assertNotNull(observable)
29+
}
30+
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.