Discussion:
Call some function from another gradle file
cupello
2014-02-14 00:18:23 UTC
Permalink
Given two files:

build.gradle with :

aplly from: main.gradle

task someTask << {
myMainMethod()
}

main.gradle with:

def myMainMethod(){
println "Main Method"
}

Why does this not work? Why did the file build.gradle not see my method?




--
View this message in context: http://gradle.1045684.n5.nabble.com/Call-some-function-from-another-gradle-file-tp5712293.html
Sent from the gradle-user mailing list archive at Nabble.com.
Luke Daley
2014-02-14 01:08:10 UTC
Permalink
Hello,

This mailing list is no longer actively used.

Would you mind posting your question to http://forums.gradle.org?
14 February 2014 10:18 am
aplly from: main.gradle
task someTask << {
myMainMethod()
}
def myMainMethod(){
println "Main Method"
}
Why does this not work? Why did the file build.gradle not see my method?
--
http://gradle.1045684.n5.nabble.com/Call-some-function-from-another-gradle-file-tp5712293.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
Russel Winder
2014-02-14 11:13:10 UTC
Permalink
Post by Luke Daley
Hello,
This mailing list is no longer actively used.
Sadly.

When are the forum suppliers going to integrate email lists? There was a
promise that this woudl happen.
Post by Luke Daley
Would you mind posting your question to http://forums.gradle.org?
14 February 2014 10:18 am
aplly from: main.gradle
s/ll/pl/
Post by Luke Daley
task someTask << {
myMainMethod()
}
def myMainMethod(){
println "Main Method"
}
Why does this not work? Why did the file build.gradle not see my method?
--
http://gradle.1045684.n5.nabble.com/Call-some-function-from-another-gradle-file-tp5712293.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder-***@public.gmane.org
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel-***@public.gmane.org
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Loading...