@@ -37,6 +37,8 @@ class IntegrationTest(
37
37
val isGradleManagedDeviceTest =
38
38
configuration.pluginConfiguration.getPropertyValue(" runOnGradleManagedDevices" )?.toBoolean() ? : false
39
39
Assume .assumeFalse(System .getenv(" GITHUB_ACTIONS" ) != null && isGradleManagedDeviceTest)
40
+
41
+ Assume .assumeFalse(configuration.ignore)
40
42
}
41
43
42
44
@Test
@@ -67,6 +69,14 @@ class IntegrationTest(
67
69
" "
68
70
}
69
71
)
72
+
73
+ putValue(" defaultConfig.clearPackageData" , " testInstrumentationRunnerArguments clearPackageData: 'true'" .takeIf { configuration.projectConfiguration.clearPackageData })
74
+
75
+ val testOrchestrator = configuration.projectConfiguration.testOrchestrator
76
+
77
+ putValue(" defaultConfig.testOrchestrator" , " testInstrumentationRunnerArguments useTestStorageService: 'true'" .takeIf { testOrchestrator })
78
+ putValue(" testOptions.testOrchestrator" , " execution 'ANDROIDX_TEST_ORCHESTRATOR'" .takeIf { testOrchestrator })
79
+ putValue(" dependencies.testOrchestrator" , " androidTestUtil libs.testOrchestrator" .takeIf { testOrchestrator })
70
80
}
71
81
File (projectRoot, " app/build.gradle.tmp" ).inputStream().use {
72
82
File (projectRoot, " app/build.gradle" ).writeText(templateAppBuildGradleFile.process(it, Charsets .UTF_8 ))
@@ -212,6 +222,7 @@ class IntegrationTest(
212
222
}
213
223
214
224
data class TestConfiguration (
225
+ val ignore : Boolean = false ,
215
226
val projectConfiguration : ProjectConfiguration ,
216
227
val pluginConfiguration : PluginConfiguration
217
228
) {
@@ -225,6 +236,10 @@ class IntegrationTest(
225
236
data class Property (val name : String , val value : String )
226
237
}
227
238
228
- data class ProjectConfiguration (val addGradleManagedDevice : Boolean = true )
239
+ data class ProjectConfiguration (
240
+ val addGradleManagedDevice : Boolean = true ,
241
+ val clearPackageData : Boolean = false ,
242
+ val testOrchestrator : Boolean = false ,
243
+ )
229
244
}
230
245
}
0 commit comments