Merge pull request #14906 from nik9000/gradle_empty_dir
Survive missing directories
This commit is contained in:
commit
ea512763ae
|
@ -288,7 +288,11 @@ class BuildPlugin implements Plugin<Project> {
|
|||
project.tasks.withType(JavaCompile) {
|
||||
options.fork = true
|
||||
options.forkOptions.executable = new File(project.javaHome, 'bin/javac')
|
||||
options.compilerArgs << '-Werror' << '-Xlint:all' << '-Xdoclint:all' << '-Xdoclint:-missing'
|
||||
/*
|
||||
* -path because gradle will send in paths that don't always exist.
|
||||
* -missing because we have tons of missing @returns and @param.
|
||||
*/
|
||||
options.compilerArgs << '-Werror' << '-Xlint:all,-path' << '-Xdoclint:all' << '-Xdoclint:-missing'
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,7 +111,11 @@ class PrecommitTasks {
|
|||
task.outputs.file(successMarker)
|
||||
task.executable = new File(project.javaHome, 'bin/java')
|
||||
task.doFirst({
|
||||
task.args('-cp', testClasspath.asPath, 'org.elasticsearch.bootstrap.JarHell')
|
||||
/* JarHell doesn't like getting directories that don't exist but
|
||||
gradle isn't especially careful about that. So we have to do it
|
||||
filter it ourselves. */
|
||||
def taskClasspath = testClasspath.filter { it.exists() }
|
||||
task.args('-cp', taskClasspath.asPath, 'org.elasticsearch.bootstrap.JarHell')
|
||||
})
|
||||
if (task.logger.isInfoEnabled() == false) {
|
||||
task.standardOutput = new ByteArrayOutputStream()
|
||||
|
|
Loading…
Reference in New Issue