in src/main/java/software/amazon/smithy/gradle/SmithyUtils.java [219:242]
private static FileCollection resolveCliClasspath(Project project, FileCollection cliClasspath) {
if (cliClasspath == null) {
FileCollection buildScriptCp = SmithyUtils.getBuildscriptClasspath(project);
project.getLogger().info("Smithy CLI classpath is null, so using buildscript: {}", buildScriptCp);
return resolveCliClasspath(project, buildScriptCp);
}
// Add the CLI classpath if it's missing from the given classpath.
if (!cliClasspath.getAsPath().contains("smithy-cli")) {
FileCollection defaultCliCp = SmithyUtils.getSmithyCliClasspath(project);
project.getLogger().info("Adding CLI classpath to command: {}", defaultCliCp.getAsPath());
cliClasspath = cliClasspath.plus(defaultCliCp);
} else {
project.getLogger().info("Smithy CLI classpath already has the CLI in it");
}
for (File f : cliClasspath) {
if (!f.exists()) {
project.getLogger().error("CLI classpath JAR does not exist: {}", f);
}
}
return cliClasspath;
}