https://kotlinlang.org logo
#splitties
Title
# splitties
p

pawegio

09/15/2020, 12:58 PM
I have a problem (in both
3.0.0-dev-105
and
3.0.0-beta01
) with assembling custom build type. I have alpha build type declared in
app
module as follows:
Copy code
buildTypes {
    getByName("alpha") {
        applicationIdSuffix = ".alpha"
        versionNameSuffix = "-alpha"
    }
}
l

louiscad

09/15/2020, 1:06 PM
Hello @pawegio Can you try setting a matchingFallback to either release or debug?
p

pawegio

09/15/2020, 1:07 PM
thanks! I’ll try it and I’ll let you know.
👍 1
@louiscad it worked like a charm 🎉 thanks man! 🙂
🎉 1
l

louiscad

09/15/2020, 1:19 PM
Great! I need to add it in a known issues or FAQ part of the doc
BTW, may I ask you what are the splits you're using?
p

pawegio

09/15/2020, 1:21 PM
sure:
Copy code
com.louiscad.splitties:splitties-fun-pack-android-base-with-views-dsl:${Versions.splitties}

com.louiscad.splitties:splitties-fun-pack-android-material-components-with-views-dsl:${Versions.splitties}

com.louiscad.splitties:splitties-checkedlazy:${Versions.splitties}
l

louiscad

09/15/2020, 1:22 PM
Oh, you're using the big fun packs with Views DSL!
p

pawegio

09/15/2020, 1:23 PM
yes, we have no layouts declared in XML files 🙂
👌 1
l

louiscad

09/15/2020, 1:23 PM
Be sure to read changelog of alpha7 and beta1, there's a bunch of new stuff in Views DSL
p

pawegio

09/15/2020, 1:25 PM
ok thanks, mainly we had to migrate our dp()/dip() methods usage
l

louiscad

09/15/2020, 1:25 PM
Ah yeah, I had to as well 😅
You probably saw it: if you're using IDE preview, you now have a way to have it without any xml files
p

pawegio

09/15/2020, 1:47 PM
yes, I do. I have an abstract preview class:
Copy code
abstract class ScreenUiPreview(ui: Ui) : FrameLayout(ui.ctx, null) {

    init {
        add(ui.root, lParams(matchParent, matchParent))
    }
}
and I subclass it for each
Ui
, it just requires importing
AttributeSet
to work.
Copy code
@Suppress("unused", "UNUSED_PARAMETER")
private class MenuUiPreview(ctx: Context, attributeSet: AttributeSet) :
    ScreenUiPreview(MenuUiImpl(ctx).apply {
        // ui setup
    })
l

louiscad

09/15/2020, 1:47 PM
Why not use the updated
UiPreView
provided by Splitties?
p

pawegio

09/15/2020, 1:50 PM
Oh, so I missed it. I used xml preview for a while, but it stopped working or I had some issues.
I’ll check it 👍