1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 16:28:12 -07:00

[GITHUB-205] Fix flavor tasks.

Fixes https://github.com/cbeust/kobalt/issues/205
This commit is contained in:
Cedric Beust 2016-05-19 05:36:49 -08:00
parent 0a98317bb8
commit f4f95c0da7
3 changed files with 1 additions and 13 deletions

View file

@ -162,13 +162,6 @@ open class JvmCompilerPlugin @Inject constructor(
@IncrementalTask(name = JvmCompilerPlugin.TASK_COMPILE, description = "Compile the project", group = GROUP_BUILD, @IncrementalTask(name = JvmCompilerPlugin.TASK_COMPILE, description = "Compile the project", group = GROUP_BUILD,
runAfter = arrayOf(TASK_CLEAN)) runAfter = arrayOf(TASK_CLEAN))
fun taskCompile(project: Project): IncrementalTaskInfo { fun taskCompile(project: Project): IncrementalTaskInfo {
// Generate the BuildConfig before invoking sourceDirectories() since that call
// might add the buildConfig source directories
val sourceDirectory = context.variant.maybeGenerateBuildConfig(project, context)
if (sourceDirectory != null) {
sourceDirectories.add(sourceDirectory)
}
// Set up the source files now that we have the variant // Set up the source files now that we have the variant
sourceDirectories.addAll(context.variant.sourceDirectories(project, context, SourceSet.of(isTest = false))) sourceDirectories.addAll(context.variant.sourceDirectories(project, context, SourceSet.of(isTest = false)))

View file

@ -78,11 +78,6 @@ class TaskManager @Inject constructor(val args: Args,
}.forEach { }.forEach {
put(it.name, it) put(it.name, it)
} }
dynamicTasks.filter {
it.plugin.accept(project)
}.forEach {
put(it.name, it)
}
} }
} }

View file

@ -49,7 +49,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
super.apply(project, context) super.apply(project, context)
project.projectProperties.put(LIBS_DIR, KFiles.libsDir(project)) project.projectProperties.put(LIBS_DIR, KFiles.libsDir(project))
taskContributor.addVariantTasks(this, project, context, "assemble", group = "build", taskContributor.addVariantTasks(this, project, context, "assemble", group = "build",
runAfter = listOf ("compile"), dependsOn = listOf("compile"),
runTask = { doTaskAssemble(project) }) runTask = { doTaskAssemble(project) })
} }