This message was deleted.
# community-support
s
This message was deleted.
🙌 1
a
I think you need to clarify if you are using maven or gradle. To add another project in gradle you can simply add it as an
include
in your
settings.gradle
.
Since
settings.gradle
is scriptable it's just a simple if statement to exclude it based on that condition.
h
Of course as the question title, I am confused in a Gradle project.
Is there a simple guide for it? I am really a newbie of Gradle.
v
While it is most probably not a good idea, you can simply use an
if
, checking for a Gradle property. Both DSLs are Turing-complete languages.
h
what is the better solution, use a custom task for the specific requirement?
v
Hard to say generically, that heavily depends on the concrete situation. Maybe a separate subproject could be appropriate. Or maybe a feature variant. Or really the `if`s. Really hard to say.
s
I do this thru conditionally-included sub-configurations. I define a Gradle property and use this to decide which to
apply from
. https://github.com/sbabcoc/Selenium-Foundation/blob/master/build.gradle#L25
🎉 1
This replicates Maven profiles pretty closely.