-
Notifications
You must be signed in to change notification settings - Fork 16
Consuming Rules
Danny Thomas edited this page May 17, 2016
·
6 revisions
Dependency rules are read from the resolutionRules
configuration. Zip and jar archives are supported, as are flat JSON files. JSON files within archives can at any directory level, and more than one json file can be provided.
dependencies {
resolutionRules files('local-rules.json')
resolutionRules 'com.myorg:resolution-rules:latest.release'
}
Rules are named using the filename of the rules file, omitting the .json
extension.
By default, all non-optional rules are applied. To enable only the specified rules, use:
nebulaResolutionRules {
include = ['local-rules']
}
Rules can be excluded using:
nebulaResolutionRules {
exclude = ['local-rules']
}
If include
s are specified, exclude
is ignored.
Optional rules files are prefixed with optional-
, and can be enabled using optional
:
dependencies {
resolutionRules files('optional-local-rules.json')
}
nebulaResolutionRules {
optional = ['local-rules']
}
To use nebula.dependency-lock with this plugin, apply nebula.dependency-lock
later than the resolution rules plugin.