Hi
I want to add the gradle build file to the inputs of a task. This is
to grab the version from the build.gradle file and so should run
whenever the buildfile has been modified, but doesn't need to
otherwise.
To try and not hard code "build.gradle" in case it is ever run with an
alternative build file, I tried to use Project.getBuildFile(). This is
when I discovered that the Project.files() method to build a file
collection takes lots of things, but File is not one of them! Seems a
little weird that you cannot easily put a File into a FileCollection.
Is there an easy way to convert the File object into something that
can be passed into Project.files()? Doing a File to String conversion
and then trying to resolve a relative path seems more complicated than
needed.
Or is there an easy way to generate a FileCollection from a single
File instance?
...Just found SingletonFileCollection, Is that is the best way, even
if I don't have a TaskDependency? Using something in api.internal
seems wrong as well.
thanks,
Philip
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email