This message was deleted.
# community-support
s
This message was deleted.
v
How do you include
Common
in the main build?
And can't you do
gw :common:base:assembleDebug
from the main build directory instead of
gw :base:assembleDebug
in the common dir?
🙌 1
r
Thanks!! I have added a custom task in main dir gradle which contains the common dir modules tasks, it’s working, may I know the reason why it doesn’t work in case if I trigger from common dir ?
v
You shouldn't need a new task to do what I said, unless you are on an old Gradle version. As to your last question, you did not share enough information to answer, you didn't even answer my question. ;-)
r
@Vampire
How do you include
Common
in the main build?
by pointing the project dir like below
Copy code
include ':common'
project(':common').projectDir = new File(settingsDir, './common/common')

include ':base'
project(':base').projectDir = new File(settingsDir, './common/base')

include ':widgets'
project(':widgets').projectDir = new File(settingsDir, './common/widgets')
You shouldn't need a new task to do what I said, unless you are on an old Gradle version.
Agree, but in my actual scenario I need to call multiple commands, with some checks, so I have to go with either custom tasks or .sh script.
v
From the naming I assume you include these things into multiple builds?
Never ever ever ever ever ever ever ever ever do that. One project should always ever be part of exactly one build. If you need it in another build, use a composite build by including the whole build.