My build file is big and hard to maintain, how to split the build file into separate files with smaller tasks to be imported into the main gradle file
Asked
Active
Viewed 4,480 times
1 Answers
14
build.gradle
apply from: 'other.gradle'
other.gradle
println "configuring $project"
task hello << {
println 'hello from other script'
}
Output of gradle -q hello
> gradle -q hello
configuring root project 'configureProjectUsingScript'
hello from other script
Source: Configuring the project using an external build script

Rudziankoŭ
- 10,681
- 20
- 92
- 192