diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cc99c090..116614ade 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ We use [semantic versioning](http://semver.org/): - PATCH version when you make backwards compatible bug fixes. # Next version +- [fix] _teamscale-gradle-plugin_: `jacoco.includeNoLocationClasses` and `jacoco.excludeClassLoaders` on a test task now reach the profiler. Previously the plugin dropped both, so neither had any effect on which classes the profiler instruments. - [fix] _teamscale-jacoco-agent_: The profiler no longer aborts the JVM during startup under a class loader that records no local file for its own JAR, such as IntelliJ's `PathClassLoader`. It falls back to the JAR named by the `-javaagent` argument. - [fix] _impacted-test-engine_: Tests in a `@ParameterizedClass` are now collected. - [fix] _impacted-test-engine_: A test failure inside a nested test container (e.g. an invocation of a `@ParameterizedClass`) is no longer swallowed. diff --git a/teamscale-gradle-plugin/src/main/kotlin/com/teamscale/config/AgentConfiguration.kt b/teamscale-gradle-plugin/src/main/kotlin/com/teamscale/config/AgentConfiguration.kt index cf4753016..aa1102ac1 100644 --- a/teamscale-gradle-plugin/src/main/kotlin/com/teamscale/config/AgentConfiguration.kt +++ b/teamscale-gradle-plugin/src/main/kotlin/com/teamscale/config/AgentConfiguration.kt @@ -99,6 +99,12 @@ abstract class AgentConfiguration @Inject constructor( argument.append("out", destination.asFile.get()) argument.append("includes", jacocoExtension.includes) argument.append("excludes", jacocoExtension.excludes) + // The profiler replaces JaCoCo's own agent, so a setting it does not forward has no effect at + // all. The agent passes options prefixed `jacoco-` on to JaCoCo. + argument.append("jacoco-exclclassloader", jacocoExtension.excludeClassLoaders) + if (jacocoExtension.isIncludeNoLocationClasses) { + argument.append("jacoco-inclnolocationclasses", true) + } argument.append("mode", "testwise") argument.append("http-server-port", url.port) if (debugLogging.getOrElse(false)) {