Skip to content

Commit cb50965

Browse files
committed
add test for implicit task wiring from producer task to generator with multiple Gradle versions
1 parent 5924e8d commit cb50965

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

modules/openapi-generator-gradle-plugin/src/test/kotlin/GenerateTaskDslTest.kt

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -646,16 +646,12 @@ class GenerateTaskDslTest : TestBase() {
646646

647647
@DataProvider(name = "gradle_version_provider")
648648
private fun gradleVersionProvider(): Array<Array<String>> = arrayOf(
649-
arrayOf("8.14.4", "STRING"),
650-
arrayOf("8.14.4", "FILE"),
651-
arrayOf("8.5", "STRING"),
652-
arrayOf("8.5", "FILE"),
649+
arrayOf("8.14.4"),
650+
arrayOf("8.5"),
653651
)
654652

655653
@Test(dataProvider = "gradle_version_provider")
656-
fun `test implicit task wiring from producer task to generator`(gradleVersion: String, format: String) {
657-
val propertyFormat = PropertyFormat.valueOf(format)
658-
654+
fun `test implicit task wiring from producer task to generator`(gradleVersion: String) {
659655
// Build script with a producer task that creates a spec file at execution time
660656
val buildContents = """
661657
plugins {
@@ -692,11 +688,7 @@ paths:
692688
// Configure the generator with implicit wiring
693689
openApiGenerate {
694690
generatorName = "kotlin"
695-
${if (propertyFormat == PropertyFormat.FILE) {
696-
"inputSpec.set(producer.flatMap { it.outputFile })"
697-
} else {
698-
"inputSpec = producer.flatMap { it.outputFile.get().asFile.absolutePath }"
699-
}}
691+
inputSpec.set(producer.flatMap { it.outputFile })
700692
outputDir = layout.buildDirectory.dir("generated")
701693
apiPackage = "org.openapitools.example.api"
702694
modelPackage = "org.openapitools.example.model"

0 commit comments

Comments
 (0)