kotlinx.kover.gradle.plugin.tools.jacoco.JacocoOnlineInstrumentation.kt Maven / Gradle / Ivy
/*
* Copyright 2017-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
*/
package kotlinx.kover.gradle.plugin.tools.jacoco
import java.io.*
internal fun buildJvmAgentArgs(jarFile: File, binReportFile: File, excludedClasses: Set): List {
val agentArgs = listOfNotNull(
"destfile=${binReportFile.canonicalPath},append=true,inclnolocationclasses=true,dumponexit=true,output=file,jmx=false",
excludedClasses.joinToFilterString("excludes")
).joinToString(",")
return listOf("-javaagent:${jarFile.canonicalPath}=$agentArgs")
}
private fun Collection.joinToFilterString(filterName: String): String? {
if (isEmpty()) return null
return filterName + "=" + joinToString(":")
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy