Skip to content

Commit

Permalink
Remove baseOutputDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Chelombitko committed Jul 22, 2024
1 parent 338e64f commit bbd2b6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,10 @@ import java.io.File

internal fun createCommonConfiguration(
project: Project,
marathonConfig: MarathonExtension,
sdkDirectory: File
): Configuration {
val output = getOutputDirectory(project, marathonConfig)

return createConfiguration(
extensionConfig = marathonConfig,
sdkDirectory = sdkDirectory,
output = output
)
}

private fun createConfiguration(
extensionConfig: MarathonExtension,
sdkDirectory: File,
output: File
sdkDirectory: File
): Configuration = Configuration(
outputDir = output,
outputDir = project.layout.buildDirectory.dir("reports/marathon").get().asFile,
customAnalyticsTracker = extensionConfig.customAnalyticsTracker,
poolingStrategy = extensionConfig.poolingStrategy?.toStrategy(),
shardingStrategy = extensionConfig.shardingStrategy?.toStrategy(),
Expand All @@ -57,13 +43,9 @@ private fun createConfiguration(
testOutputTimeoutMillis = extensionConfig.testOutputTimeoutMillis,
noDevicesTimeoutMillis = extensionConfig.noDevicesTimeoutMillis,
debug = extensionConfig.debug,
vendorConfiguration = createAndroidConfiguration(extensionConfig, sdkDirectory)
vendorConfiguration = createAndroidConfiguration(extension = extensionConfig, sdkDirectory = sdkDirectory)
)

private fun getOutputDirectory(project: Project, extensionConfig: MarathonExtension): File =
extensionConfig.baseOutputDir?.let { File(it) }
?: project.layout.buildDirectory.dir("reports/marathon").get().asFile

private fun createAndroidConfiguration(extension: MarathonExtension, sdkDirectory: File): AndroidConfiguration {
val autoGrantPermission = extension.autoGrantPermission ?: DEFAULT_AUTO_GRANT_PERMISSION
val instrumentationArgs = extension.instrumentationArgs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ open class MarathonExtension {
var strictRunFilterConfiguration: StrictRunFilterPluginConfiguration? = null
var listener: MarathonListener? = null

var baseOutputDir: String? = null

var cache: CachePluginConfiguration? = null
var ignoreFailures: Boolean? = null
var isCodeCoverageEnabled: Boolean? = null
Expand Down

0 comments on commit bbd2b6f

Please sign in to comment.