Sample code
dependencies {
compile project (':aProject')
compile name: 'somefile'
compile files('libs/something_local.jar')
compile 'com.google.code.gson:gson:2.3.1'
}
My questions are
What's the difference between compile project
and compile name
here?
Is compile name
the same as compile files
?
When do you use compile
directly as shown in the 5th line of code
What does compile
do here? Is it compiling the files inside bracket/single quotes? Can I use something like 'build' etc.?
Compile means, it is compiling the library in other to be used on your project
compile project (':aProject')
compile files('libs/something_local.jar')
compile name: 'something_local'
compile(name:'something_local', ext:'jar')
compile 'com.google.code.gson:gson:2.3.1'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.