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

Refactor PomGenerator.

This commit is contained in:
Cedric Beust 2016-07-25 00:39:06 -08:00 committed by Erik C. Thauvin
parent 60a61f0867
commit bc1e26bd1a
8 changed files with 29 additions and 20 deletions

View file

@ -77,7 +77,7 @@ class PackagingPlugin @Inject constructor(val dependencyManager : DependencyMana
packageConfig.wars.forEach { warGenerator.generateWar(packageConfig.project, context, it) }
packageConfig.zips.forEach { zipGenerator.generateZip(packageConfig.project, context, it) }
if (packageConfig.generatePom) {
pomFactory.create(project).generate()
pomFactory.create(project).generateAndSave()
}
}
TaskResult()

View file

@ -41,7 +41,7 @@ public class PublishPlugin @Inject constructor(val files: KFiles, val factory: P
@Suppress("UNUSED_FUNCTION_LITERAL")
@Task(name = TASK_GENERATE_POM, description = "Generate the .pom file", dependsOn = arrayOf("assemble"))
fun taskGeneratePom(project: Project): TaskResult {
factory.create(project).generate()
factory.create(project).generateAndSave()
return TaskResult()
}

View file

@ -35,7 +35,7 @@ class VariantTest : KobaltTest() {
)
@Test(dataProvider = "projectVariants", description =
"Make sure we generate the correct dynamic tasks based on the product flavor and build types.")
"Make sure we generateAndSave the correct dynamic tasks based on the product flavor and build types.")
fun taskNamesShouldWork(expected: Set<String>, project: Project) {
val variantNames = HashSet(Variant.allVariants(project).map { it.toTask("compile") })
Assert.assertEquals(variantNames, expected)