Stop project from compiling


(Nick Pocock) #1

I have a React app and Ratpack app which get built by Gradle. In my Ratpacks build.gradle dependencies I have

compile project(’:react-app’)

To compile my React app when my application is run, is it possible when I run

./gradlew run

I can add an argument that will stop the react app from compiling, say I had the command

./gradlew run noReact

And then If I wanted to compile both I could do ./gradlew run

I have done some research on multi project gradle builds but couldn’t find a solution. Thanks


(Stefan Oehme) #2

Why would you want to do that? If nothing changed in your react app, Gradle will correctly see that it is up-to-date and do no unnecessary work.


(Nick Pocock) #3

When I use -t run, whenever I change any code the whole application gets rebuilt, even If I haven’t changed any code in my React App, running the yarn install for react seems to take quite a while. I was thinking I could do ./gradlew -t noReact if I am just changing my Ratpack application code to make it a bit quicker for me


(Stefan Oehme) #4

he whole application gets rebuilt, even If I haven’t changed any code in my React App

It shouldn’t get rebuilt. Sounds like a misconfiguration in your project or a bad community plugin. Can you please provide a reproducible example?