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

ru.astrainteractive.gradleplugin.AndroidNamespacePlugin.kt Maven / Gradle / Ivy

package ru.astrainteractive.gradleplugin

import com.android.build.gradle.BaseExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.findByType
import ru.astrainteractive.gradleplugin.property.extension.ModelPropertyValueExt.hierarchyGroup

class AndroidNamespacePlugin : Plugin {
    override fun apply(target: Project) {
        val baseExtension = target.extensions.findByType()
        if (baseExtension?.namespace.isNullOrBlank()) {
            baseExtension?.namespace = target.hierarchyGroup
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy