1
0
Fork 0
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:
Cedric Beust 2015-11-18 19:53:38 -08:00
parent c708b4e730
commit 5dc0cc44ea
4 changed files with 36 additions and 30 deletions

View file

@ -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) })
}
/**