mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
Set the source directories after the variant has been set.
This commit is contained in:
parent
dba627bd0f
commit
2b3cb81a9b
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,6 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
super.apply(project, context)
|
||||
project.projectProperties.put(DEPENDENT_PROJECTS, projects())
|
||||
taskContributor.addVariantTasks(this, project, context, "compile", runTask = { taskCompile(project) })
|
||||
sourceDirectories.addAll(context.variant.sourceDirectories(project))
|
||||
}
|
||||
|
||||
@Task(name = TASK_TEST, description = "Run the tests",
|
||||
|
@ -136,6 +135,9 @@ abstract class JvmCompilerPlugin @Inject constructor(
|
|||
|
||||
@Task(name = JvmCompilerPlugin.TASK_COMPILE, description = "Compile the project")
|
||||
fun taskCompile(project: Project) : TaskResult {
|
||||
// Set up the source files now that we have the variant
|
||||
sourceDirectories.addAll(context.variant.sourceDirectories(project))
|
||||
|
||||
val sourceDirectory = context.variant.maybeGenerateBuildConfig(project, context)
|
||||
if (sourceDirectory != null) {
|
||||
sourceDirectories.add(sourceDirectory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue