mirror of https://github.com/apache/lucene.git
LUCENE-9333: Use DirectoryProperty instead of directly having Provider; move script file to input field.
This commit is contained in:
parent
10d1ecb431
commit
51c15b8660
|
@ -32,11 +32,15 @@ class ChangesToHtmlTask extends DefaultTask {
|
|||
File siteDir = project.rootProject.file("lucene/site/changes")
|
||||
|
||||
@OutputDirectory
|
||||
Provider<File> targetDir = project.providers.provider { project.file("${project.docroot}/changes") }
|
||||
final DirectoryProperty targetDir = project.objects.directoryProperty()
|
||||
.fileProvider(project.providers.provider { project.file("${project.docroot}/changes") })
|
||||
|
||||
@Input
|
||||
def luceneDocUrl = "${->project.luceneDocUrl}"
|
||||
|
||||
@InputFile
|
||||
def script = project.rootProject.file("${siteDir}/changes2html.pl")
|
||||
|
||||
def loadVersions(File outfile) {
|
||||
// load version properties from DOAP RDF
|
||||
def prefix = "doap.${project.name}".toString()
|
||||
|
@ -52,13 +56,13 @@ class ChangesToHtmlTask extends DefaultTask {
|
|||
def result = project.exec {
|
||||
executable "perl"
|
||||
standardInput changesFile.newInputStream()
|
||||
standardOutput project.file("${targetDir.get()}/Changes.html").newOutputStream()
|
||||
standardOutput project.file("${targetDir.get().getAsFile()}/Changes.html").newOutputStream()
|
||||
errorOutput = output
|
||||
ignoreExitValue = true
|
||||
|
||||
args += [
|
||||
"-CSD",
|
||||
project.rootProject.file("${siteDir}/changes2html.pl").toString(),
|
||||
script,
|
||||
"${project.name}",
|
||||
versionsFile.toString(),
|
||||
luceneDocUrl.concat('/') // slash required at end by perl script
|
||||
|
|
Loading…
Reference in New Issue