Gradle dependencies: what's the difference between a compilation project and a compilation name?

Code example

dependencies {    
    compile project (':aProject')
    compile name: 'somefile'
    compile files('libs/something_local.jar')
    compile 'com.google.code.gson:gson:2.3.1'
}

My questions

  • What is the difference between compile projectand compile namehere?

  • Is it compile namethe same as compile files?

  • When you use compiledirectly, as shown in the 5th line of code

  • What is doing here compile? Is this a compilation of files inside brackets / single quotes? Can I use something like "build", etc.?

+4
source share
1 answer

Compile means, it compiles the library into others to be used in your project

compilation project (': aProject')

('libs/something_local.jar')

  • ( lib)

: "something_local"

compile (: 'something_local', ext: 'jar')

  • , , (, , )

'com.google.code.gson: gson: 2.3.1'

  • maven, .
+4

Source: https://habr.com/ru/post/1609889/


All Articles