polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [2/2] zest-java git commit: build: fix xslt task inputs declaration
Date Fri, 16 Dec 2016 22:48:26 GMT
build: fix xslt task inputs declaration


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/05439b73
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/05439b73
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/05439b73

Branch: refs/heads/develop
Commit: 05439b7353a5e5b8667cfd357176b9f592d0b571
Parents: 20331cf
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Fri Dec 16 22:42:43 2016 +0100
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Fri Dec 16 23:47:18 2016 +0100

----------------------------------------------------------------------
 .../groovy/org/apache/zest/gradle/doc/XsltTask.groovy    | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/05439b73/buildSrc/src/main/groovy/org/apache/zest/gradle/doc/XsltTask.groovy
----------------------------------------------------------------------
diff --git a/buildSrc/src/main/groovy/org/apache/zest/gradle/doc/XsltTask.groovy b/buildSrc/src/main/groovy/org/apache/zest/gradle/doc/XsltTask.groovy
index d992e9f..333acf0 100644
--- a/buildSrc/src/main/groovy/org/apache/zest/gradle/doc/XsltTask.groovy
+++ b/buildSrc/src/main/groovy/org/apache/zest/gradle/doc/XsltTask.groovy
@@ -19,9 +19,9 @@ package org.apache.zest.gradle.doc
 
 import groovy.transform.CompileStatic
 import org.gradle.api.file.EmptyFileVisitor
+import org.gradle.api.tasks.Input
 import org.gradle.api.tasks.SourceTask
 import org.gradle.api.tasks.OutputDirectory
-import org.gradle.api.tasks.Optional
 import org.gradle.api.tasks.InputFile
 import org.gradle.api.tasks.TaskAction
 import org.gradle.api.file.FileVisitDetails
@@ -71,11 +71,10 @@ class XsltTask extends SourceTask
 {
 
   @OutputDirectory
-  @Optional
   File destDir
 
-  @Optional
-  String extension
+  @Input
+  String extension = 'html'
 
   @InputFile
   File stylesheetFile
@@ -92,10 +91,6 @@ class XsltTask extends SourceTask
       {
         // Remove the extension from the file name
         def name = fvd.file.name.replaceAll( '[.][^\\.]*$', '' )
-        if( extension == null )
-        {
-          extension = 'html'
-        }
         name += '.' + extension
         def destFile = new File( destDir, name )
         transformer.transform( new StreamSource( fvd.file ), new StreamResult( destFile )
)


Mime
View raw message