All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.pocketbyte.locolaser.mobile.IosResourcesConfig.kt Maven / Gradle / Ivy

Go to download

Implementation of platform for LocoLaser tool to work with Android and iOS platforms.

There is a newer version: 2.5.0
Show newest version
/*
 * Copyright © 2017 Denis Shurygin. All rights reserved.
 * Licensed under the Apache License, Version 2.0
 */

package ru.pocketbyte.locolaser.mobile

import ru.pocketbyte.locolaser.config.resources.BaseResourcesConfig
import ru.pocketbyte.locolaser.config.resources.ResourceFileProvider
import ru.pocketbyte.locolaser.config.resources.ResourcesConfigBuilderFactory
import ru.pocketbyte.locolaser.mobile.resource.IosResources
import ru.pocketbyte.locolaser.mobile.resource.file.provider.IosResourceFileProvider
import java.io.File

/**
 * iOS platform configuration.
 *
 * @author Denis Shurygin
 */
class IosResourcesConfig(
    workDir: File?,
    resourceName: String?,
    resourcesDirPath: String?,
    resourceFileProvider: ResourceFileProvider?,
    filter: ((key: String) -> Boolean)?
) : BaseResourcesConfig(
    workDir,
    resourceName,
    resourcesDirPath,
    resourceFileProvider ?: IosResourceFileProvider,
    filter
) {

    companion object : ResourcesConfigBuilderFactory {
        const val TYPE = "ios"

        override fun getBuilder(): IosResourcesConfigBuilder {
            return IosResourcesConfigBuilder()
        }
    }

    override val type = TYPE

    override val defaultResourcesPath = "./"
    override val defaultResourceName = "Localizable"

    override val resources by lazy {
        IosResources(
            resourcesDir = this.resourcesDir,
            name = this.resourceName,
            resourceFileProvider = this.resourceFileProvider,
            filter = this.filter
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy