Not that I know. You could just define a separate project that produces a Jar and then include that in your build script {}…then have some script to wire up that you need to execute the other project first then the main build.
-- John Engelman On Tuesday, January 7, 2014 at 1:09 PM, Xavier Ducrohet [via Gradle] wrote: > Yes, I'd like to have a buildSrc folder but it's challenging due to an > existing folder structure. > > Is there any way to point Gradle to a buildSrc located somewhere else? > > > On Tue, Jan 7, 2014 at 12:48 PM, johnrengelman <[hidden email] > (/user/SendEmail.jtp?type=node&node=5712172&i=0)> wrote: > > If I remember correctly I don't think that will work…I believe doing 'apply > > from: foo.gradle' the script in foo.gradle is processed with a new > > ClassLoader, so the classes won't be accessible to the calling script. > > > > Generally classes like the one you are describing would be better suited to > > be defined in the buildSrc folder so it is compiled and added to your > > build's class path > > (http://www.gradle.org/docs/current/userguide/organizing_build_logic.html) > > > > -- > > John Engelman > > > > > > On Tuesday, January 7, 2014 at 12:38 PM, Xavier Ducrohet [via Gradle] wrote: > > > > > > > > > Hi, > > > > > > trying to refactor some internal code, I'm running into another issue > > > with 'apply from' > > > > > > There's a foo.gradle file that only declares a new class extending > > > DefaultTask, and we're trying to use it from another gradle file after > > > doing 'apply from: foo.gradle' but it doesn't find the type. > > > > > > Is there a way to make this work? > > > > > > If you reply to this email, your message will be added to the discussion > > > below: > > > http://gradle.1045684.n5.nabble.com/declaring-a-class-in-a-gradle-file-and-using-it-through-apply-from-tp5712170.html > > > > > > To start a new topic under gradle-dev, email [hidden email] > > > (http://user/SendEmail.jtp?type=node&node=5712171&i=0) > > > To unsubscribe from gradle-dev, click here. > > > NAML > > > (http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml) > > > > > > > > > View this message in context: Re: declaring a class in a gradle file and > > using it through apply from > > (http://gradle.1045684.n5.nabble.com/declaring-a-class-in-a-gradle-file-and-using-it-through-apply-from-tp5712170p5712171.html) > > Sent from the gradle-dev mailing list archive > > (http://gradle.1045684.n5.nabble.com/gradle-dev-f1436218.html) at > > Nabble.com (http://Nabble.com). > > > > If you reply to this email, your message will be added to the discussion > below: > http://gradle.1045684.n5.nabble.com/declaring-a-class-in-a-gradle-file-and-using-it-through-apply-from-tp5712170p5712172.html > > To start a new topic under gradle-dev, email > ml-node+s1045684n1436218...@n5.nabble.com > (mailto:ml-node+s1045684n1436218...@n5.nabble.com) > To unsubscribe from gradle-dev, click here > (http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1436218&code=am9obi5yLmVuZ2VsbWFuQGdtYWlsLmNvbXwxNDM2MjE4fDIyMTUyNjEzNQ==). > NAML > (http://gradle.1045684.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml) > -- View this message in context: http://gradle.1045684.n5.nabble.com/declaring-a-class-in-a-gradle-file-and-using-it-through-apply-from-tp5712170p5712173.html Sent from the gradle-dev mailing list archive at Nabble.com.