Hi, does anyone know if there is a possibility to ...
# intellij
h
Hi, does anyone know if there is a possibility to pass in parameters when build in intellij is delegated to gradle? My build depends on a -D param that the IDE should pick up. Thanks :) (Not a run config or task execution, the project build)
a
I think this should just work when you specify properties in
gradle.properties
file: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_system_properties
h
Thanks for the response, that doesn't work for us, the property is false by Default (so gradlew build does the right thing by default) and has to be true if build by intellij. Is there any other way to determine if idea calls build, maybe a special property that is passed in by idea? The use case is quite simple, we do code Generation to fill some hostnames and Ports.. is done in build and checks whether local ports or random ports should be used (in ci by default). In intellij we don't want a build action to regenerate code to use non local ports because we need local ports for local development. The Workflow is very very nice, if not this single missing piece would be...
a
I don't see such a property in the documentation, probably it does not exist. Can you please create a feature request for IDEA team at https://youtrack.jetbrains.com/issues/IDEA and describe your use case? Thanks!
h
Hi, sorry for the late reply, i took the topic to discussion with my team and we decided to flip our workflows and use "local" build by default, because it's more pleasant to use for people. So, we don't need any property anymore. My guess is that other people will go this way too, would you like me to open a ticket nonetheless, even though we solved the problem by enhancing our process?
a
Glad you solved the problem! Yes, I think it would still be nice to open an issue in IDEA tracker, describe the use case and workaround, it will potentially help other people too.