hfhbd
12/11/2022, 10:30 AMDerek Ellis
12/13/2022, 12:16 AMColton Idle
12/13/2022, 8:31 AMstate.curseWords = result.body()?.string()?.lines()
I'm predicting that this is bad for 2 reasons and wanted to sanity check if my reasoning is sound
1. string() could crash if the file is large enough? Best to use a "stream" (still learning about bytestreams, etc) but it makes sense that I'd want to "stream" the info into a list before checking if the list
2. If the list is extremely large, it might not even fit into a List<String> and so it might be best to stream the file and somehow on each line (while streaming) check if the username == currentWord in list.
Are my two assumptions above correct?Austin Michne
12/13/2022, 11:59 PMGabriel Feo
12/14/2022, 3:01 PMGabriel Feo
12/16/2022, 12:23 PMTroy Perales
12/19/2022, 8:29 PMAny
.
e: com.squareup.anvil.compiler.api.AnvilCompilationException: Back-end (JVM) Internal error: com.squareup.anvil.annotations.ContributesMultibinding contributes a binding for kotlin.Any, but doesn't extend this type.
Based on this test, Anvil seems to support what I’m looking for, but I must be overlooking something: https://github.com/square/anvil/blob/main/compiler/src/test/java/com/squareup/anvil/compiler/codegen/ContributesMultibindingGeneratorTest.kt#L325-L339.
Any pointers would be appreciated. Here is the offending code:
@ContributesMultibinding(AppScope::class, boundType = Any::class)
@JsonAdapters
class CallStrategyAdapter
Colton Idle
05/21/2022, 5:02 AMColton Idle
12/29/2022, 7:48 AMwss
the way to go?jessewilson
12/29/2022, 8:19 AMspierce7
01/02/2023, 6:56 PMhfhbd
01/02/2023, 7:12 PMvbsteven
01/03/2023, 1:25 PMDerek Ellis
01/03/2023, 4:40 PMsample/
directory of repo. If it roughly matches the functionality of the other samples (querying tables and displaying the entries) then that would be more than finevbsteven
01/04/2023, 11:59 AMdimsuz
01/04/2023, 11:32 PMbuild/generated/code/commonMain/.../File.kt
, but I struggle to find how do I mark this "commonMain" as a source root from within my plugin. I need to do this for KMP/android/kotlin projects.
I found that sqldelight-gradle-plugin uses Source
data class but where exactly this "mark as source root" happens, I cannot find.
If anyone would point me either to the Gradle API to use or to the place in sqldelight's souces to study, I'd be grateful.jw
01/04/2023, 11:38 PMjw
01/04/2023, 11:39 PMdimsuz
01/04/2023, 11:39 PMjw
01/04/2023, 11:40 PMjw
01/04/2023, 11:40 PMdimsuz
01/04/2023, 11:41 PMjw
01/04/2023, 11:43 PMdimsuz
01/04/2023, 11:45 PMhfhbd
01/05/2023, 8:15 AMmbonnin
01/05/2023, 10:34 AMsourceDirectorySet.srcDir(...)
works well for non-Android projects. For Android, I think you have to use onVariant {}
and addGeneratedSourceDirectory()
to get proper IDE support (but it's not 100% clear what).
addGeneratedSourceDirectory
takes ownership of the directory where the file are generated so it takes a mutable FileProperty
as input.mbonnin
01/05/2023, 10:36 AMjw
01/05/2023, 10:47 AMjw
01/05/2023, 10:47 AMmbonnin
01/05/2023, 10:52 AMsourceDirectorySet.srcDir()
with kotlin file providers and it builds ok (including adding the dependency).