rwachol
07/24/2017, 10:00 AMjosefrichter
07/24/2017, 2:27 PMscruffyfox
07/24/2017, 2:31 PMfun searchParent(id: String): Module?
{
modules.forEach { module ->
val ret = searchParent(module, id)
if (ret != null)
{
return@searchParent ret
}
}
return null
}
kevinmost
07/24/2017, 3:39 PMArrayList
. I made a set of extensions for this:
fun Bundle.putParcelableList(key: String, value: List<Parcelable>) = putParcelableArrayList(key, value.asArrayList())
fun Bundle.putStringList(key: String, value: List<String>) = putStringArrayList(key, value.asArrayList())
internal fun <T> List<T>.asArrayList() = (this as? ArrayList) ?: ArrayList(this)
uhe
07/24/2017, 3:43 PMmap
, flatMap
etc
I often find these easier to process than "oldschool" java loops. Just to give you an idea (completely untested and may not meet your needs):
fun searchParent(id: String): Module? =
modules
.asSequence()
.mapNotNull { searchParent(it, id) }
.firstOrNull()
fun searchParent(root: Module, id: String): Module? =
root.steps
?.asSequence()
?.flatMap { it.steps?.asSequence() ?: emptySequence() }
?.firstOrNull { it.id == id }
mikejauregui
07/24/2017, 9:41 PMkingsley
07/25/2017, 12:52 PMkhoatd191
07/25/2017, 2:23 PMError:Execution failed for task ':app:kaptDebugKotlin'.
> Internal compiler error. See log for more details
I’m using AS 3.0, dagger 2.11joachim.reiss.
07/25/2017, 3:24 PMartem_zin
07/26/2017, 6:07 AMrockerhieu
07/26/2017, 7:42 AM--debug
I found that gradle will try to find the dependencies in all repositories. In my project dependencies are scattered in 9 repositories. Gradle spends most of the time looking for most of the dependencies in the irrelevant repositories. Is there a best practice for this?oday
07/26/2017, 12:02 PMishanarya
07/26/2017, 7:14 PMbryan
07/26/2017, 9:29 PMvmalikov
07/27/2017, 4:11 AModay
07/27/2017, 8:44 AMT
?martynas
07/27/2017, 8:46 AMtakeIf
or takeUnless
or any other function marked @SinceKotlin("1.1")
I get message Unresolved reference: takeIf
.
Although building project works without any problems.
Tried:
- Reinstall plugin
- Invalidate Caches / Restart
- Use AS 3.0 Alpha 8 (same issue)
- Use 1.1.4 eap KT plugin
Not really sure what to do next?rednifre
07/27/2017, 9:46 PMkagomez
07/27/2017, 10:03 PM1.1.3-2
kotlin version
Error:(24, 0) Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.
kagomez
07/27/2017, 10:06 PMtask clean
from my gradle but any idea of why this happens?seriabov
07/28/2017, 10:40 AM> to eliminate findViewById callsAren’t Kotlin Android Extensions good for this job?
Paul Woitaschek
07/28/2017, 10:46 AMjw
07/29/2017, 8:18 PMahmed.yousef
07/30/2017, 1:24 PMPaul Woitaschek
07/30/2017, 3:27 PMblakelee
07/30/2017, 9:59 PMrkeazor
08/01/2017, 11:17 AMnankai
08/02/2017, 2:36 AMsubhash_pandey
08/02/2017, 7:23 AMuhe
08/02/2017, 9:09 AMuhe
08/02/2017, 9:09 AMdekans
08/02/2017, 8:00 PM