I`m trying to reuse this example:
build.gradle

task intTestJar(type: Jar) {
    from sourceSets.intTest.classes
}


I`m trying to do it from custom plugin so I have:

public class LibraryPlugin implements Plugin {
...
def void use (Project project, ProjectPluginsContainer
projectPluginsHandler){
project.usePlugin('java')
...
project.task unitTestJar(type: Jar) {
            from project.sourceSets.unitTest.classes
        }
}
...
}


The gradle throws exception on evaluating:
* What went wrong:
A problem occurred evaluating project ':app'.
Cause: No signature of method: lv.ctco.scm.cs.LibraryPlugin.unitTestJar() is
app
licable for argument types: (java.util.LinkedHashMap,
lv.ctco.scm.cs.LibraryPlug
in$_LibraryBuild_closure3) values: [[type:class
org.gradle.api.tasks.bundling.Ja
r], lv.ctco.scm.cs.libraryplugin$_librarybuild_closu...@10948cf]

How to reuse task type of other plugin?
-- 
View this message in context: 
http://old.nabble.com/Assembling-a-JAR-for-a-custom-source-set-tp26130892p26130892.html
Sent from the gradle-user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to