1- @file:Suppress(" FunctionName" )
1+ @file:Suppress(" FunctionName" , " JUnitMalformedDeclaration " )
22
33package io.github.reactivecircus.appversioning
44
5- import com.google.testing.junit.testparameterinjector.TestParameter
6- import com.google.testing.junit.testparameterinjector.TestParameterInjector
5+ import app.cash.burst.Burst
76import io.github.reactivecircus.appversioning.fixtures.AppProjectTemplate
7+ import io.github.reactivecircus.appversioning.fixtures.BuildScriptLanguage
88import io.github.reactivecircus.appversioning.fixtures.LibraryProjectTemplate
99import io.github.reactivecircus.appversioning.fixtures.withFixtureRunner
1010import io.github.reactivecircus.appversioning.internal.GitClient
@@ -14,15 +14,14 @@ import org.gradle.testkit.runner.TaskOutcome
1414import org.junit.Rule
1515import org.junit.Test
1616import org.junit.rules.TemporaryFolder
17- import org.junit.runner.RunWith
1817import java.io.File
1918import kotlin.test.assertEquals
2019import kotlin.test.assertFalse
2120import kotlin.test.assertNull
2221import kotlin.test.assertTrue
2322
24- @RunWith( TestParameterInjector :: class )
25- class AppVersioningPluginIntegrationTest {
23+ @Burst
24+ class AppVersioningPluginIntegrationTest ( private val buildScriptLanguage : BuildScriptLanguage ) {
2625 @get:Rule
2726 val fixtureDir = TemporaryFolder ()
2827
@@ -81,15 +80,13 @@ class AppVersioningPluginIntegrationTest {
8180 }
8281
8382 @Test
84- fun `plugin tasks are registered for Android App project with product flavors` (
85- @TestParameter useKts : Boolean
86- ) {
83+ fun `plugin tasks are registered for Android App project with product flavors` () {
8784 GitClient .initialize(fixtureDir.root)
8885
8986 val flavors = listOf (" mock" , " prod" )
9087 withFixtureRunner(
9188 fixtureDir = fixtureDir,
92- subprojects = listOf (AppProjectTemplate (useKts = useKts , flavors = flavors))
89+ subprojects = listOf (AppProjectTemplate (buildScriptLanguage = buildScriptLanguage , flavors = flavors))
9390 ).runAndCheckResult(
9491 " tasks" ,
9592 " --group=versioning"
@@ -241,17 +238,15 @@ class AppVersioningPluginIntegrationTest {
241238 }
242239
243240 @Test
244- fun `plugin generates versionCode and versionName for the assembled APK when assemble task is run` (
245- @TestParameter useKts : Boolean
246- ) {
241+ fun `plugin generates versionCode and versionName for the assembled APK when assemble task is run` () {
247242 GitClient .initialize(fixtureDir.root).apply {
248243 val commitId = commit(message = " 1st commit." )
249244 tag(name = " 1.2.3" , message = " 1st tag" , commitId = commitId)
250245 }
251246
252247 withFixtureRunner(
253248 fixtureDir = fixtureDir,
254- subprojects = listOf (AppProjectTemplate (useKts = useKts ))
249+ subprojects = listOf (AppProjectTemplate (buildScriptLanguage = buildScriptLanguage ))
255250 ).runAndCheckResult(
256251 " assembleRelease"
257252 ) {
@@ -276,17 +271,15 @@ class AppVersioningPluginIntegrationTest {
276271 }
277272
278273 @Test
279- fun `plugin generates versionCode and versionName for the assembled APKs when splits-APKs is enabled` (
280- @TestParameter useKts : Boolean
281- ) {
274+ fun `plugin generates versionCode and versionName for the assembled APKs when splits-APKs is enabled` () {
282275 GitClient .initialize(fixtureDir.root).apply {
283276 val commitId = commit(message = " 1st commit." )
284277 tag(name = " 1.2.3" , message = " 1st tag" , commitId = commitId)
285278 }
286279
287280 withFixtureRunner(
288281 fixtureDir = fixtureDir,
289- subprojects = listOf (AppProjectTemplate (useKts = useKts , splitsApks = true ))
282+ subprojects = listOf (AppProjectTemplate (buildScriptLanguage = buildScriptLanguage , splitsApks = true ))
290283 ).runAndCheckResult(
291284 " assembleRelease"
292285 ) {
@@ -311,17 +304,21 @@ class AppVersioningPluginIntegrationTest {
311304 }
312305
313306 @Test
314- fun `plugin generates versionCode and versionName for the assembled APKs when splits-APKs is enabled and universal mode is on` (
315- @TestParameter useKts : Boolean
316- ) {
307+ fun `plugin generates versionCode and versionName for the assembled APKs when splits-APKs is enabled and universal mode is on` () {
317308 GitClient .initialize(fixtureDir.root).apply {
318309 val commitId = commit(message = " 1st commit." )
319310 tag(name = " 1.2.3" , message = " 1st tag" , commitId = commitId)
320311 }
321312
322313 withFixtureRunner(
323314 fixtureDir = fixtureDir,
324- subprojects = listOf (AppProjectTemplate (useKts = useKts, splitsApks = true , universalApk = true ))
315+ subprojects = listOf (
316+ AppProjectTemplate (
317+ buildScriptLanguage = buildScriptLanguage,
318+ splitsApks = true ,
319+ universalApk = true ,
320+ )
321+ )
325322 ).runAndCheckResult(
326323 " assembleRelease"
327324 ) {
@@ -359,7 +356,12 @@ class AppVersioningPluginIntegrationTest {
359356 """ .trimIndent()
360357 withFixtureRunner(
361358 fixtureDir = fixtureDir,
362- subprojects = listOf (AppProjectTemplate (pluginExtension = extension))
359+ subprojects = listOf (
360+ AppProjectTemplate (
361+ buildScriptLanguage = buildScriptLanguage,
362+ pluginExtension = extension,
363+ )
364+ )
363365 ).runAndCheckResult(
364366 " assembleRelease"
365367 ) {
0 commit comments