alec
10/21/2019, 3:31 PMCody Engel
10/21/2019, 3:56 PMalec
10/21/2019, 4:16 PMNikky
10/21/2019, 4:34 PMalec
10/21/2019, 4:34 PMCody Engel
10/21/2019, 5:00 PMjishindev
10/22/2019, 1:41 PMwire3
on Android with Gradle Kotlin DSL. It does not compile once I add the gradle plugin to the app level gradle file. I have the following in my gradle config right now-
Project level
-------------------------------------
buildscript {
repositories {
...
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.1")
classpath(kotlin("gradle-plugin", version = "1.3.40"))
classpath("com.squareup.wire:wire-gradle-plugin:3.0.0")
}
}
--------------------------------------
App level
--------------------------------------
plugins {
id("com.android.application")
kotlin("android")
kotlin("android.extensions")
kotlin("kapt")
id("com.squareup.wire") // GIVES - "Task with name 'compileJava' not found in project ':app'." WHEN ADDED
}
android {
compileSdkVersion(29)
defaultConfig {
applicationId = "<http://com.example.android.app|com.example.android.app>"
minSdkVersion(23)
targetSdkVersion(29)
...
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets.onEach {
it.java.srcDir("src/${it.name}/kotlin")
}
sourceSets.getByName("main")
.java.srcDirs(file("$buildDir/generated/source/wire"))
}
// Wire
wire { // wire DOES NOT RESOLVE
kotlin{}
}
val kotlinVersion = "1.3.40"
val wireVersion = "3.0.1"
dependencies {
implementation(kotlin("stdlib-jdk7", version = kotlinVersion))
...
implementation("com.squareup.wire:wire-runtime:$wireVersion")
implementation("com.squareup.wire:wire-grpc-client:$wireVersion")
}
Anything that I'm missing here?jw
10/22/2019, 1:44 PMjw
10/22/2019, 1:45 PMjishindev
10/22/2019, 1:48 PMjishindev
10/22/2019, 2:08 PMhmole
10/22/2019, 2:44 PMmoshi
apis such as valueSink
and valueSource
are good choice for that? @jwFail
10/23/2019, 10:22 AMW/SQLiteConnectionPool: A SQLiteConnection object for database '/data/user/0/ru.myapp.agent/databases/myAppAgentDB0.4.db' was leaked! Please fix your application to end transactions in progress properly and to close the database when it is no longer needed.
How to close database?Zach Klippenstein (he/him) [MOD]
10/25/2019, 12:46 PMBen Tseytlin
10/31/2019, 7:42 PMfor (each table in database) { drop table }
Cody Engel
11/04/2019, 7:56 PMTo test, we are using instrumented espresso tests.Depending on what you are testing you also are free to write the tests to run on the JVM. We are doing that with a project I’m on right now and it has worked out well. I’m assuming there is the potential for some variances since we aren’t using the Android SQLite driver on the tests but haven’t ran into any issues yet.
dimsuz
11/05/2019, 11:20 AMsqldelight
question. Say I have a query like
SELECT column1 FROM table WHERE column2 IN ?
If I pass an empty list I guess it will return an empty row set. But what if I want to pass an empty list and get ALL rows in this case. Do I absolutely have to have 2 almost identical queries for this (second being one without an IN
)?
Asking because in my case query has quite a complicated WHERE
clause, I'm afraid maintaining 2 versions of it could be prone to forgetting.egorand
11/05/2019, 1:34 PMdimsuz
11/05/2019, 2:49 PM?
parameters, will re-check.jw
11/06/2019, 12:47 AM?
in the creation of the view, but when you query it you're more than welcome to.Paul Woitaschek
11/06/2019, 8:42 AMPaul Woitaschek
11/06/2019, 8:44 AMdimsuz
11/06/2019, 10:23 AMViews work just like tables. You can't have a ? in the creation of the view, but when you query it you're more than welcome to.Yeah, the thing is that in my case WHERE has quite a few conditions, so I didn't want to duplicate it only because
IN ?
doesn't handle case when ?
is an empty collection. But don't think it actually should, just thought there maybe some pattern I don't know about. For now I duplicated my query.Ben Tseytlin
11/08/2019, 4:06 PMalec
11/08/2019, 4:07 PMalec
11/08/2019, 4:07 PMBen Tseytlin
11/08/2019, 4:16 PMval players: Observable<List<HockeyPlayer>> =
playerQueries.selectAll()
.asObservable()
.mapToList()
re rxjava: here’s the example from the readme. if properly set up, would the table be able to emit the added/changed HockeyPlayers, or the entire list? Or does it need to be explicitly queriedalec
11/08/2019, 4:17 PMBen Tseytlin
11/08/2019, 4:19 PMBen Tseytlin
11/08/2019, 4:25 PM