Configuring external dependencies.
--- a/gradle.rst Wed Aug 08 23:14:45 2018 +0300
+++ b/gradle.rst Mon Aug 13 01:33:28 2018 +0300
@@ -216,6 +216,54 @@
For each configuration ``build<ConfigurationName>`` and ``upload<ConfigurationName>`` are defined.
+Configuring external dependencies
+=================================
+
+Adding large well known artifact repositories::
+
+ repositories {
+ mavenCentral()
+ jcenter()
+ }
+
+``mavelLocal()`` for local ``~/.m2`` or whenever Maven ``settings.xml`` is pointing.
+
+Adding custom repositories::
+
+ repositories {
+ maven { url "http://repo.example.com/maven2" }
+ ivy { url "http://repo.example.com/ivy" }
+ maven {
+ url "http://repo.example.com/maven2"
+ username "ro-user"
+ password "pas$$word"
+ }
+ }
+
+Excluding transitive dependencies::
+
+ compile 'org.springframework:spring-web:4.3.10.RELEASE' {
+ exclude group: 'com.google.code.gson', module: 'gson'
+ }
+
+ configurations.all {
+ exclude group: 'com.google.code.gson', module: 'gson'
+ }
+
+ configurations.runtime {
+ exclude group: 'com.google.code.gson', module: 'gson'
+ }
+
+Forcing a specific version of a transitive dependency::
+
+ configurations.all {
+ resolutionStrategy.force 'com.google.code.gson:gson:2.8.1'
+ }
+
+Declaring dependency on module in multi-module build::
+
+ compile project(':core')
+
List project properties
=======================
::