Caleb Cushing
01/08/2025, 12:03 AMJvmTestSuite
called testIntegration
. How does this file get created?
Test runtime classpath does not contain plugin metadata file 'plugin-under-test-metadata.properties'
org.gradle.testkit.runner.InvalidPluginMetadataException: Test runtime classpath does not contain plugin metadata file 'plugin-under-test-metadata.properties'
@ParameterizedTest
@ArgumentsSource(BuildScriptArgumentsProvider.class)
void configurationCache(String fileName, String buildScript) throws IOException {
Files.writeString(testProjectDir.toPath().resolve(fileName), buildScript);
var build = GradleRunner.create()
.withProjectDir(testProjectDir)
.withArguments("logGit", "--configuration-cache", "--stacktrace")
.withPluginClasspath()
.build();
assertThat(build.getOutput()).contains("semver:0.1.0");
}
Vampire
01/08/2025, 3:05 AMgradlePlugin {
testSourceSets sourceSets.testIntegration
}
to make withPluginClasspath()
working.Thomas Broyer
01/08/2025, 9:02 AM