ru.pocketbyte.locolaser.kotlinmpp.KotlinAbsKeyValueResourcesConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resource-kotlin-mpp Show documentation
Show all versions of resource-kotlin-mpp Show documentation
Implementation of platform for LocoLaser tool to work with Kotlin MPP projects.
The newest version!
package ru.pocketbyte.locolaser.kotlinmpp
import ru.pocketbyte.locolaser.config.resources.ResourcesConfigBuilderFactory
import ru.pocketbyte.locolaser.config.resources.filter.ResourcesFilter
import ru.pocketbyte.locolaser.kotlinmpp.resource.KotlinAbsKeyValueResources
import ru.pocketbyte.locolaser.resource.formatting.FormattingType
import ru.pocketbyte.locolaser.resource.formatting.NoFormattingType
import java.io.File
class KotlinAbsKeyValueResourcesConfig(
workDir: File?,
resourceName: String?,
resourcesDirPath: String?,
interfaceName: String?,
override val formattingType: FormattingType = NoFormattingType,
filter: ResourcesFilter?
) : KotlinBaseResourcesConfig(
workDir, resourceName, resourcesDirPath, interfaceName, filter
), KotlinResourcesConfigWithFormattingType {
companion object : ResourcesConfigBuilderFactory {
const val TYPE = "kotlin-abs-key-value"
override fun getBuilder(): KotlinAbsKeyValueResourcesConfigBuilder {
return KotlinAbsKeyValueResourcesConfigBuilder()
}
}
override val type = TYPE
override val defaultResourcesPath = "./build/generated/src/main/kotlin/"
override val defaultResourceName = "$DEFAULT_PACKAGE.AbsKeyValue$DEFAULT_INTERFACE_NAME"
override val resources by lazy {
KotlinAbsKeyValueResources(
dir = this.resourcesDir,
name = this.resourceName,
interfaceName = this.implements,
formattingType = this.formattingType,
resourceFileProvider = this.resourceFileProvider,
filter = this.filter
)
}
}