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 errorMode = project.propertyOrDefault('eclipse.errors','warning');
|
||||||
def ecjLintFile = rootProject.file('gradle/validation/ecj-lint/ecj.javadocs.prefs');
|
def ecjLintFile = rootProject.file('gradle/validation/ecj-lint/ecj.javadocs.prefs');
|
||||||
|
|
||||||
|
description = 'Generates the Eclipse JDT settings file.'
|
||||||
|
|
||||||
inputs.file(ecjLintFile)
|
inputs.file(ecjLintFile)
|
||||||
inputs.property('errorMode', errorMode)
|
inputs.property('errorMode', errorMode)
|
||||||
|
|
||||||
doLast {
|
|
||||||
def ecjLintConfig = ecjLintFile.getText('UTF-8')
|
|
||||||
.replaceAll(/=error\b/, '=' + errorMode)
|
|
||||||
project.sync {
|
|
||||||
from rootProject.file("${resources}/dot.settings")
|
from rootProject.file("${resources}/dot.settings")
|
||||||
into rootProject.file(".settings")
|
into rootProject.file(".settings")
|
||||||
filter(ReplaceTokens, tokens: [
|
filter(ReplaceTokens, tokens: [
|
||||||
'ecj-lint-config': ecjLintConfig
|
'ecj-lint-config': ecjLintFile.getText('UTF-8').replaceAll(/=error\b/, '=' + errorMode)
|
||||||
])
|
])
|
||||||
filteringCharset = 'UTF-8'
|
filteringCharset = 'UTF-8'
|
||||||
}
|
|
||||||
|
doLast {
|
||||||
logger.lifecycle('Eclipse config written with ECJ errors configured as {}. Change by passing -Peclipse.errors=ignore/warning/error.', errorMode)
|
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 {
|
public class LibEntry implements ClasspathEntry {
|
||||||
|
|
Loading…
Reference in New Issue