buildSimbotApplicationLauncher
fun <Config : ApplicationConfiguration, Builder : ApplicationBuilder<A>, A : Application> buildSimbotApplicationLauncher(factory: ApplicationFactory<Config, Builder, A>, block: ApplicationDslBuilder<Config, Builder, A>.() -> Unit = {}): ApplicationLauncher<A>(source)
通过 ApplicationDslBuilder 来使用DSL风格或链式调用风格构建目标 ApplicationLauncher<A>.
此api与 simbotApplication 的区别在于 buildSimbotApplicationLauncher 将 config
和 builder
函数进行了简单的拆分, 使得 buildSimbotApplicationLauncher 相对于 simbotApplication 来讲更适合在 config
和 builder
中都存在大量需要配置的内容的情况。
e.g.
val launcher = buildSimbotApplicationLauncher(Foo) {
config { /* ... */}
build { /* ... */}
}
// ...
Content copied to clipboard