com.github.mictaege.jitter.plugin.JitterExtension.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jitter-plugin Show documentation
Show all versions of jitter-plugin Show documentation
The jitter-plugin is a Gradle plugin to build and distribute different flavours of an application from a single source base.
package com.github.mictaege.jitter.plugin
import groovy.transform.Canonical
import org.gradle.api.Action
import org.gradle.util.ConfigureUtil
@Canonical
class JitterExtension {
/** List of the projects flavours. */
List flavours = new ArrayList<>()
/** Java source code compliance level (1,2,3,4,5, 6, 7 or 8). (default: 8) */
int compliance = 8
/** List of excluded source sets. */
List excludeSrcSets = new ArrayList<>()
void flavour(Closure closure) {
def instance = new FlavourCfg()
flavours.add(instance)
ConfigureUtil.configure(closure, instance)
}
void flavour(Action super FlavourCfg> action) {
def instance = new FlavourCfg()
flavours.add(instance)
action.execute(instance)
}
}