mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Support flavors with the "run" task.
This commit is contained in:
parent
c708b4e730
commit
5dc0cc44ea
4 changed files with 36 additions and 30 deletions
|
@ -53,18 +53,7 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
super.apply(project, context)
|
||||
project.projectProperties.put(BUILD_DIR, project.buildDirectory + File.separator + "classes")
|
||||
project.projectProperties.put(DEPENDENT_PROJECTS, projects())
|
||||
|
||||
project.productFlavors.keys.forEach { pf ->
|
||||
project.buildTypes.keys.forEach { bt ->
|
||||
val taskName = Variant(pf, bt).toTask("compile")
|
||||
addTask(project, taskName, "Compile $taskName",
|
||||
task = { p: Project ->
|
||||
context.variant = Variant(pf, bt)
|
||||
taskCompile(project)
|
||||
TaskResult()
|
||||
})
|
||||
}
|
||||
}
|
||||
addVariantTasks(project, "compile", emptyList(), { taskCompile(project) })
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue