Discussion:
New to gradle - Referring a file that is present inside source directory
rabmdu
2014-07-03 08:04:05 UTC
Permalink
Hello,

I have a simple project which has two major branch namely main and test. The
test dir looks like as below. src->test->groovy->'some files'

I need to run one of these some files, which is a groovy script, in my
gradle task. This script requires a file present in src/test/groovy/<one
file> and also src/test/groovy/models/<one_file>. I have a gradle task as
below

task runTest(dependsOn:[copyTask,classes], type:JavaExec) {
main = 'myScript'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
}

How do I make myScript to access the files required by it? Any pointer to
gradle documentation will help

Any example would help a lot :-)





--
View this message in context: http://gradle.1045684.n5.nabble.com/New-to-gradle-Referring-a-file-that-is-present-inside-source-directory-tp5712795.html
Sent from the gradle-user mailing list archive at Nabble.com.
Russel Winder
2014-07-04 07:46:24 UTC
Permalink
Hi,

Before Luke dives in and says "this email list is redundant, please go
and use the forum", I'll chip in and say: Gradleware have chosen to do
all their user support via their forum which has no viable email
interface, so this email list is not useful for asking questions. You
really would be well advised to cut and past your text here into a forum
question. Gradleware folk and others are very responsive within the
forum. And you can opt for email notification of responses to a
question.
Post by rabmdu
Hello,
I have a simple project which has two major branch namely main and test. The
test dir looks like as below. src->test->groovy->'some files'
I need to run one of these some files, which is a groovy script, in my
gradle task. This script requires a file present in src/test/groovy/<one
file> and also src/test/groovy/models/<one_file>. I have a gradle task as
below
task runTest(dependsOn:[copyTask,classes], type:JavaExec) {
main = 'myScript'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
}
How do I make myScript to access the files required by it? Any pointer to
gradle documentation will help
Any example would help a lot :-)
--
View this message in context: http://gradle.1045684.n5.nabble.com/New-to-gradle-Referring-a-file-that-is-present-inside-source-directory-tp5712795.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
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
Luke Daley
2014-07-04 08:42:33 UTC
Permalink
And here I was about to say: “Before Russel dives in and chastises us for using http://forums.gradle.org as the primary support channel as it supports searching, status, threading, code highlighting, google friendliness, history and more
” you’ve kindly pointed rabmdu there for me.

Thanks Russel :)
On 4 July 2014 at 5:46:29 pm, Russel Winder (***@winder.org.uk) wrote:

Hi,

Before Luke dives in and says "this email list is redundant, please go
and use the forum", I'll chip in and say: Gradleware have chosen to do
all their user support via their forum which has no viable email
interface, so this email list is not useful for asking questions. You
really would be well advised to cut and past your text here into a forum
question. Gradleware folk and others are very responsive within the
forum. And you can opt for email notification of responses to a
question.
Post by rabmdu
Hello,
I have a simple project which has two major branch namely main and test. The
test dir looks like as below. src->test->groovy->'some files'
I need to run one of these some files, which is a groovy script, in my
gradle task. This script requires a file present in src/test/groovy/<one
file> and also src/test/groovy/models/<one_file>. I have a gradle task as
below
task runTest(dependsOn:[copyTask,classes], type:JavaExec) {
main = 'myScript'
classpath sourceSets.test.runtimeClasspath
classpath sourceSets.main.runtimeClasspath
}
How do I make myScript to access the files required by it? Any pointer to
gradle documentation will help
Any example would help a lot :-)
--
View this message in context: http://gradle.1045684.n5.nabble.com/New-to-gradle-Referring-a-file-that-is-present-inside-source-directory-tp5712795.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
http://xircles.codehaus.org/manage_email
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:***@ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: ***@winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder


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

http://xircles.codehaus.org/manage_email


— 

Luke Daley
http://www.gradleware.com

Loading...