when rebuilding the client with another setting of -Penv=xxx without making changes to the source code, the task :prepareScripts is up to date, and thus the right server settings are not set correctly in the output.
Exemple :
17:49 samuel@ra% gradle clean
Environment is set to: local
:clean
BUILD SUCCESSFUL
Total time: 0.939 secs
17:49 samuel@ra% gradle -Penv=local assemble
Environment is set to: local
:prepareScripts
:assembleArchive
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar
:assemble
BUILD SUCCESSFUL
Total time: 1.01 secs
17:49 samuel@ra% gradle -Penv=production assemble
Environment is set to: production
:prepareScripts UP-TO-DATE
:assembleArchive UP-TO-DATE
:compileJava UP-TO-DATE
:compileGroovy UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:jar UP-TO-DATE
:assemble UP-TO-DATE
BUILD SUCCESSFUL
Total time: 0.933 secs
I would suggest to add inputs.property("environment", environment)̀ at the beginning of the prepareScript task.
Hello,
when rebuilding the client with another setting of
-Penv=xxx
without making changes to the source code, the task:prepareScripts
is up to date, and thus the right server settings are not set correctly in the output.Exemple :
I would suggest to add
inputs.property("environment", environment)̀
at the beginning of theprepareScript
task.