mirror of
https://github.com/rife2/bld
synced 2026-03-15 07:34:09 +01:00
Log missing source files when compiling. Closes #66
This commit is contained in:
parent
0c9d15053c
commit
53e8e01455
|
|
@ -87,12 +87,19 @@ public class CompileOperation extends AbstractOperation<CompileOperation> {
|
||||||
for (var directory : mainSourceDirectories()) {
|
for (var directory : mainSourceDirectories()) {
|
||||||
sources.addAll(FileUtils.getJavaFileList(directory));
|
sources.addAll(FileUtils.getJavaFileList(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sources.isEmpty()) {
|
||||||
|
if (!silent()) {
|
||||||
|
System.err.println("No main source files found.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
executeBuildSources(
|
executeBuildSources(
|
||||||
compileMainClasspath(),
|
compileMainClasspath(),
|
||||||
compileMainModulePath(),
|
compileMainModulePath(),
|
||||||
sources,
|
sources,
|
||||||
buildMainDirectory());
|
buildMainDirectory());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Part of the {@link #execute} operation, builds the test sources.
|
* Part of the {@link #execute} operation, builds the test sources.
|
||||||
|
|
@ -105,12 +112,19 @@ public class CompileOperation extends AbstractOperation<CompileOperation> {
|
||||||
for (var directory : testSourceDirectories()) {
|
for (var directory : testSourceDirectories()) {
|
||||||
sources.addAll(FileUtils.getJavaFileList(directory));
|
sources.addAll(FileUtils.getJavaFileList(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sources.isEmpty()) {
|
||||||
|
if (!silent()) {
|
||||||
|
System.err.println("No test source files found.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
executeBuildSources(
|
executeBuildSources(
|
||||||
compileTestClasspath(),
|
compileTestClasspath(),
|
||||||
compileTestModulePath(),
|
compileTestModulePath(),
|
||||||
sources,
|
sources,
|
||||||
buildTestDirectory());
|
buildTestDirectory());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Part of the {@link #execute} operation, build sources to a destination.
|
* Part of the {@link #execute} operation, build sources to a destination.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue