diff --git a/documentation/index.html b/documentation/index.html index 0b67fb8..1808f87 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -316,7 +316,52 @@ dependencies { "org.lwjgl.lwjgl:lwjgl-platform:jar:natives-osx:2.9.3" ) } -

Settings

+ +

Exclusions

+

+ It's sometimes necessary to exclude specific dependencies from your build and Kobalt lets you do this in + two ways: globally and locally. +

+
Global exclusion
+

+ A global exclusion applies to your entire project and means that any time the given dependency will + be encountered, it will be completely excluded along with all its child dependencies. +

+
+    dependencies {
+        compile("com.beust:jcommander:1.64")
+        exclude("org.testng:testng:6.10")
+    }
+
Local exclusion
+

+ A local exclusion applies to a specific dependency and allows you to exclude that dependency and its children + when this dependency is resolved. If the locally excluded dependency is found as a child of another one, + it will be included normally. Local exclusions are therefore defined after a dependency specification + and you can define them either broadly or specifically (per groupId, artifactId, or + version): +

+
+    dependencies {
+        compile("org.testng:testng:6.10") {
+            exclude(groupId = "org.apache")
+        }
+    }
+

+ In the example above, whenever Kobalt needs to calculate the dependencies of the org.testng:testng + artifact, it will exclude any dependency that is in the group org.apache and all its children. +

+
+    dependencies {
+    compile("org.testng:testng:6.10") {
+        exclude(artifactId = "jcommander", version = "1.48")
+    }
+}
+

+ In this sample, only jcommander version 1.48 and its children will be excluded + when resolving org.testng:testng:6.10. +

+ +

Settings

You can define settings that will apply to all your Kobalt builds by creating the file ~/.config/kobalt/settings.xml: