Open greyp-ionic opened 4 years ago
Since "fileTree" can handle an input folder with arbitrary structure, it would be nice to style content from that fileTree without need for post-processing move / copy.
Maybe this functionality already exists. If so, any pointers to take advantage would be appreciated.
Thanks for reporting the issue! I see what you mean and why that'd be useful. I'll look into it when I get the chance.
Thank you
0.9.0-beta1 adds rudimentary support for nested output directory layouts.
To use it, add outputDirectoryLayout 'nested'
into the xslt
task in your Gradle build file.
For the moment, it only works if both the input and output directories are under the project root directory. Behavior in all other situations (including symlinks) is undefined. If you need better support than what this version offers, feel free to comment here and I'll see what I can do.
If you can, it'd be a great help if you could try out 0.9.0-beta1 and let me know whether it works for you.
Before I tried out the new option, I replaced the dependency reference in my gradle buildscript declaration.
from:
buildscript { repositories { ... maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.com.github.eerohele:saxon-gradle:0.8.0" } }
to:
buildscript { repositories { ... maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "gradle.plugin.com.github.eerohele:saxon-gradle:0.9.0-beta1" } }
When I do this, I get the following error in phase one of Gradle script execution:
gradle clean
running Gradle 2
FAILURE: Build failed with an exception.
Where: Build file '...build.gradle' line: 5
What went wrong: A problem occurred evaluating project ':MyProject'.
Failed to apply plugin [id 'com.github.eerohele.saxon-gradle'] Could not generate a proxy class for class com.github.eerohele.SaxonXsltTask.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.769 secs
C:\Users\pgrey\dev\scm\stash\a2sdk\JavaSDK\Windows>
Java 8 / Gradle 2.14
That's a really old Gradle version. Gradle is currently at 6.0.
0.9.0-beta1 uses the Gradle Worker API, which was introduced in 5.0, I think, so anything older than that won't work.
Is it possible for you to upgrade to a newer Gradle version?
Ah, Gradle Worker API. That explains things.
Yes, 2.14 is an old version. I could run a newer Gradle to test this change, but I'm sure it works as advertised.
Thanks so much for your responsiveness and for your work! I do hope this change helps out others who don't have the same constraints.
If you cannot upgrade from Gradle 2.14, I think I can backport the outputDirectoryLayout
change on top of 0.8.0 and shunt the Worker API upgrade to 1.0 (or something), since it’s a breaking change.
I’ll see what I can do.
Proposed functionality: (1) or (2)
(1) If "input" is a fileTree, "output" should be interpreted as a base folder for output, following input folder structure.
Example:
SOURCE TREE source source/a source/a/foo.xhtml source/b source/b/bar.xhtml
TASK CONFIG SaxonXsltTask
DESIRED TARGET TREE target target/a target/a/foo.xhtml target/b target/b/bar.xhtml
As of version 0.8.0, all output goes to folder specified in "output", ignoring folder structure.
(2) If "input" is a fileTree, and "output" is not specified, overwrite input files with output files as they are processed.