Hi Jason
This will do it. For clarification, I defined the variables with explicit types
(rather than def):
task printProjectArtifacts << {
Configuration archivesConfiguration = configurations.archives
Set<File> files = archivesConfiguration.allArtifactFiles.files
files.each { println it }
}
Note that you can have more than one artifact in a project. Hence there is a
Set of artifacts per configuration.
Regards, Etienne
On 21.11.2010, at 14:33, Jason Voegele wrote:
> Hello, I am working on some fixes to the gradle-android-plugin and have what
> I hope is a simple question. I need to get a File object that refers to the
> main JAR file of the project using the plugin, i.e. whatever JAR file would
> be constructed by the gradle jar task. Given a Project object, what methods
> do I need to call on that Project object to get a handle to this file, taking
> into consideration that the user may configure this JAR file to have a
> different name and location than the Gradle default?
>
> Thanks.
>
> --
> Jason Voegele
> I guess it was all a DREAM ... or an episode of HAWAII FIVE-O ...
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
Etienne Studer
Senior Software Developer
Canoo Engineering AG
Kirschgartenstrasse 5
CH-4051 Basel
T +41 61 228 94 44
F +41 61 228 94 49
[email protected]
www.canoo.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email