2016-07-27 69 views

回答

3

的build.gradle

apply from: 'other.gradle' 

other.gradle

println "configuring $project" 
task hello << { 
    println 'hello from other script' 
} 

输出的-q的gradle你好

> gradle -q hello 
configuring root project 'configureProjectUsingScript' 
hello from other script 

来源:Configuring the project using an external build script

相关问题