New to gradle - Referring a file that is present inside source directory

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

New to gradle - Referring a file that is present inside source directory

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 :-)

Reply | Threaded
Open this post in threaded view
|

Re: New to gradle - Referring a file that is present inside source directory

Russel Winder-3
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.

On Thu, 2014-07-03 at 01:04 -0700, rabmdu wrote:

> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
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


Reply | Threaded
Open this post in threaded view
|

Re: New to gradle - Referring a file that is present inside source directory

Luke Daley-2
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 ([hidden email]) 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.

On Thu, 2014-07-03 at 01:04 -0700, rabmdu wrote:

> 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.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>

--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:[hidden email]
41 Buckmaster Road m: +44 7770 465 077 xmpp: [hidden email]
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