maskarade / gradle-android-ribbonizer-plugin

Modifies launcher icons on debug build
https://bintray.com/gfx/maven/ribbonizer-plugin
MIT License
355 stars 37 forks source link

Incompatibility with gradle kotlin-dsl #28

Open Antimonit opened 5 years ago

Antimonit commented 5 years ago

The plugin itself works great, but it cannot be configured from Gradle written in Kotlin, because the RibbonizerExtension class is not public. That results into unresolved reference: builder, unresolved reference: forcedVariantsNames, etc. and the project cannot by synced.

Following is from helper methods generated by the kotlin-dsl:

/**
 * Configures the [ribbonizer][com.github.gfx.ribbonizer.plugin.RibbonizerExtension] extension.
 *
 * `ribbonizer` is not accessible in a type safe way because:
 * - `com.github.gfx.ribbonizer.plugin.RibbonizerExtension` is not public
 */
fun org.gradle.api.Project.`ribbonizer`(configure: Any.() -> Unit): Unit =
    (this as org.gradle.api.plugins.ExtensionAware).extensions.configure("ribbonizer", configure)

I believe the only change you need to do is to declare the extension as public.