in plugins/elastic-conventions/src/integrationTest/java/co/elastic/gradle/elatic_conventions/ElasticConventionsPluginIT.java [239:301]
public void withCliMultiProjectWithoutRoot() {
helper.buildScript("p1", String.format("""
import %s
import %s
plugins {
id("co.elastic.elastic-conventions")
id("co.elastic.cli.jfrog")
id("co.elastic.cli.manifest-tool")
}
val jfrog by tasks.registering(JFrogCliExecTask::class)
val manifestTool by tasks.registering(ManifestToolExecTask::class)
tasks.check {
dependsOn(jfrog, manifestTool)
}
""", JFrogCliExecTask.class.getName(), ManifestToolExecTask.class.getName()
));
helper.buildScript("p2", String.format("""
import %s
import %s
import %s
import %s
plugins {
id("co.elastic.cli.jfrog")
id("co.elastic.cli.manifest-tool")
id("co.elastic.cli.snyk")
id("co.elastic.cli.shellcheck")
id("co.elastic.elastic-conventions")
}
val jfrog by tasks.registering(JFrogCliExecTask::class)
val manifestTool by tasks.registering(ManifestToolExecTask::class)
val snyk by tasks.registering(SnykCLIExecTask::class)
val shellCheck by tasks.registering(ShellcheckTask::class)
tasks.check {
dependsOn(jfrog, manifestTool, snyk, shellCheck)
}
""", JFrogCliExecTask.class.getName(), ManifestToolExecTask.class.getName(), SnykCLIExecTask.class.getName(), ShellcheckTask.class.getName()
));
helper.settings("""
include("p1")
include("p2")
plugins {
id("co.elastic.elastic-conventions")
}
""");
final BuildResult result = gradleRunner
.withArguments("--warning-mode", "fail", "-s", "check", "--refresh-dependencies", getVaultPrefixProperty())
.build();
System.out.println(result.getOutput());
assertPathExists(helper.projectDir().resolve(".gradle/bin/jfrog-cli"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/jfrog-cli-darwin-x86_64"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/jfrog-cli-linux-x86_64"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/jfrog-cli-linux-aarch64"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/manifest-tool"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/manifest-tool-darwin-x86_64"));
assertPathExists(helper.projectDir().resolve(".gradle/bin/manifest-tool-linux-x86_64"));
}