nebula.test.dependencies.ModuleBuilder.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nebula-test Show documentation
Show all versions of nebula-test Show documentation
Test harness for Gradle plugins
package nebula.test.dependencies
class ModuleBuilder {
Coordinate module
String status = 'integration'
List dependencies = []
ModuleBuilder(String coordinate) {
def (group, artifact, version) = coordinate.tokenize(':')
module = new Coordinate(group: group, artifact: artifact, version: version)
}
ModuleBuilder(String group, String artifact, String version) {
module = new Coordinate(group: group, artifact: artifact, version: version)
}
ModuleBuilder addDependency(String dependency) {
def (group, artifact, version) = dependency.tokenize(':')
dependencies << new Coordinate(group: group, artifact: artifact, version: version)
this
}
ModuleBuilder addDependency(String group, String artifact, String version) {
dependencies << new Coordinate(group: group, artifact: artifact, version: version)
this
}
ModuleBuilder setStatus(String status) {
this.status = status
this
}
DependencyGraphNode build() {
new DependencyGraphNode(coordinate: module, dependencies: dependencies, status: status)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy