1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Fix BuildConfig.

This commit is contained in:
Cedric Beust 2016-02-08 22:58:47 +04:00
parent a2de187e46
commit 6168e50c3f
5 changed files with 18 additions and 13 deletions

View file

@ -62,9 +62,9 @@ class JavaPlugin @Inject constructor(val javaCompiler: JavaCompiler)
= project.sourceDirectoriesTest.map { File(it) }.toList()
// IBuildConfigContributor
override fun affinity(project: Project): Int {
return if (project.projectExtra.suffixesFound.contains("java")) 1 else 0
}
override fun affinity(project: Project) = if (project.projectExtra.suffixesFound.contains("java")) 1 else 0
override val suffix = ".java"
override fun generateBuildConfig(project: Project, context: KobaltContext, packageName: String,
variant: Variant, buildConfigs: List<BuildConfig>): String {

View file

@ -127,9 +127,9 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors)
}
// IBuildConfigContributor
override fun affinity(project: Project): Int {
return if (project.projectExtra.suffixesFound.contains("kotlin")) 2 else 0
}
override fun affinity(project: Project) = if (project.projectExtra.suffixesFound.contains("kotlin")) 2 else 0
override val suffix = ".kt"
override fun generateBuildConfig(project: Project, context: KobaltContext, packageName: String,
variant: Variant, buildConfigs: List<BuildConfig>): String {