Changing location of ratpack.groovy file

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

Changing location of ratpack.groovy file

Craig Schlegelmilch
At the risk of exposing my lack of gradle expertise, I'll ask this:  Is there anyway to change the location of the ratpack.groovy file relative to my build.gradle file so that the gradle run task can still find it?  My best educated guess is this, but its definitely wrong:

sourceSets {
  run {
    resources.srcDir 'rest-api/src/ratpack'
  }
}

Is this doable?  Am I on the right track?

Craig

Reply | Threaded
Open this post in threaded view
|

Re: Changing location of ratpack.groovy file

Luke Daley
Administrator

Can you explain a little more about about what you are trying to do?
Reply | Threaded
Open this post in threaded view
|

Re: Changing location of ratpack.groovy file

Craig Schlegelmilch
Simply put, I’d like to change my directory from this:

- build.gradle
- src
- main
- ratpack
- test

To this:

- build.gradle
- rest-api
- src
- main
- ratpack
- test

…such that the ratpack tasks (e.g. run) can still work.  There appears to be an assumption/default that ratpack.groovy lives in ${project.projectDir}/src/ratpack/ratpack.groovy.  I’m wondering if there is a simple way to move away from that default.  If there isn’t, I may just have to wire together a parent gradle project.

Thanks again,

Craig



On May 13, 2015, at 2:36 AM, Luke Daley [via Ratpack Forum] <[hidden email]> wrote:


Can you explain a little more about about what you are trying to do?



If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack.io/Changing-location-of-ratpack-groovy-file-tp1055p1057.html
To unsubscribe from Changing location of ratpack.groovy file, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Changing location of ratpack.groovy file

Luke Daley
Administrator

Yeah, there’s some hardcoding of this in the Gradle plugin. You could certainly work around this by mimicking what the Gradle plugin is doing with the path of your choice.

Would you mind opening an issue to make this confiurable?
Reply | Threaded
Open this post in threaded view
|

Re: Changing location of ratpack.groovy file

Craig Schlegelmilch
Done:  https://github.com/ratpack/ratpack/issues/675

Thanks for your help.

Craig


On May 13, 2015, at 7:37 PM, Luke Daley [via Ratpack Forum] <[hidden email]> wrote:


Yeah, there’s some hardcoding of this in the Gradle plugin. You could certainly work around this by mimicking what the Gradle plugin is doing with the path of your choice.

Would you mind opening an issue to make this confiurable?



If you reply to this email, your message will be added to the discussion below:
http://forum.ratpack.io/Changing-location-of-ratpack-groovy-file-tp1055p1059.html
To unsubscribe from Changing location of ratpack.groovy file, click here.
NAML