in src/main/java/software/amazon/smithy/gradle/tasks/SmithyBuildJar.java [253:271]
private void copyModelsToStaging() {
Path sources = SmithyUtils.getProjectionPluginPath(getProject(), getProjection(), "sources");
if (!Files.isDirectory(sources)) {
if (getProjection().equals("source")) {
getLogger().warn("No Smithy model files were found");
} else {
// This means the projection was explicitly set, so fail if no models were found.
throw new GradleException("Smithy projection `" + getProjection() + "` not found or does not "
+ "contain any models. Is this projection defined in your "
+ "smithy-build.json file?");
}
}
getProject().copy(c -> {
c.from(sources.toFile());
c.into(SmithyUtils.getSmithyResourceTempDir(getProject()));
});
}