2

I see that I can specify gradle dependencies like this:

dependencies {
    compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.1'
    compile 'com.fasterxml.jackson.core:jackson-core:2.8.1'
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.1'
}

but also like this:

dependencies {
    compile(
        'com.fasterxml.jackson.core:jackson-annotations:2.8.1',
        'com.fasterxml.jackson.core:jackson-core:2.8.1',
        'com.fasterxml.jackson.core:jackson-databind:2.8.1'
    )
}

This means that the compile configuration applies to a single element but also to a list of elements. Where do I find more details about the compile semantics? I'm referring also to details like the exclude module clause:

dependencies {
    compile('org.simpleframework:simple-xml:2.7.1') {
        exclude module: 'stax'
        exclude module: 'stax-api'
        exclude module: 'xpp3'
    }
}

I've seen this page, but it doesn't contain this kind of details. Does Android Studio offer some kind of help to learn Gradle semantics?

manfcas
  • 1,933
  • 7
  • 28
  • 47

1 Answers1

2

Here is the DependencyHandler DSL documentation.

You can access Gradle API documentation from Android Studio like javadocs for Android framework APIs eg. using Quick Documentation shortcut (in default keymap Ctrl+Q or F1 on OS X).

You have to use Gradle all distribution. Eg. if you are using gradle wrapper it can be set in gradle/wrapper/gradle-wrapper.properties like that: distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

koral
  • 2,513
  • 1
  • 32
  • 41