mirror of https://github.com/apache/lucene.git
Improvement for LUCENE-9881 (#46): Completely disable Eclipse plugins's eclipseJdt task and replace by owur own just copying the filtered config files. This now works correctly with inputs/outputs.
This commit is contained in:
parent
690e256ec9
commit
3538709269
|
@ -73,27 +73,31 @@ configure(rootProject) {
|
|||
}
|
||||
}
|
||||
|
||||
eclipseJdt {
|
||||
task luceneEclipseJdt(type: Sync) {
|
||||
def errorMode = project.propertyOrDefault('eclipse.errors','warning');
|
||||
def ecjLintFile = rootProject.file('gradle/validation/ecj-lint/ecj.javadocs.prefs');
|
||||
|
||||
description = 'Generates the Eclipse JDT settings file.'
|
||||
|
||||
inputs.file(ecjLintFile)
|
||||
inputs.property('errorMode', errorMode)
|
||||
|
||||
from rootProject.file("${resources}/dot.settings")
|
||||
into rootProject.file(".settings")
|
||||
filter(ReplaceTokens, tokens: [
|
||||
'ecj-lint-config': ecjLintFile.getText('UTF-8').replaceAll(/=error\b/, '=' + errorMode)
|
||||
])
|
||||
filteringCharset = 'UTF-8'
|
||||
|
||||
doLast {
|
||||
def ecjLintConfig = ecjLintFile.getText('UTF-8')
|
||||
.replaceAll(/=error\b/, '=' + errorMode)
|
||||
project.sync {
|
||||
from rootProject.file("${resources}/dot.settings")
|
||||
into rootProject.file(".settings")
|
||||
filter(ReplaceTokens, tokens: [
|
||||
'ecj-lint-config': ecjLintConfig
|
||||
])
|
||||
filteringCharset = 'UTF-8'
|
||||
}
|
||||
logger.lifecycle('Eclipse config written with ECJ errors configured as {}. Change by passing -Peclipse.errors=ignore/warning/error.', errorMode)
|
||||
}
|
||||
}
|
||||
|
||||
eclipseJdt {
|
||||
enabled = false
|
||||
dependsOn 'luceneEclipseJdt'
|
||||
}
|
||||
}
|
||||
|
||||
public class LibEntry implements ClasspathEntry {
|
||||
|
|
Loading…
Reference in New Issue