Skip to content

Commit

Permalink
Remove property
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga committed Oct 16, 2019
1 parent a6b36ae commit 81a5d93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class DependencyUpdatesTask extends DefaultTask {

def evaluator = new DependencyUpdates(project, resolutionStrategyAction, revisionLevel(),
outputFormatterProp(), outputDirectory(), getReportfileName(), checkForGradleUpdate, gradleReleaseChannelLevel(),
checkConstraints())
checkConstraints)
DependencyUpdatesReporter reporter = evaluator.run()
reporter?.write()
}
Expand Down Expand Up @@ -125,9 +125,4 @@ class DependencyUpdatesTask extends DefaultTask {

/** Returns the filename of the report. */
String getReportfileName() { System.properties.get('reportfileName', reportfileName) }

/** Returns whether constraints should have dependencies resolved. */
boolean checkConstraints() {
System.properties.containsKey('checkConstraints') || checkConstraints
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ final class ConstraintsSpec extends Specification {
id 'com.github.ben-manes.versions'
}
tasks.dependencyUpdates {
checkConstraints = true
}
repositories {
maven {
url '${mavenRepoUrl}'
Expand All @@ -39,7 +43,7 @@ final class ConstraintsSpec extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
.withArguments('dependencyUpdates', '-DcheckConstraints')
.withArguments('dependencyUpdates')
.withPluginClasspath()
.build()

Expand All @@ -59,6 +63,10 @@ final class ConstraintsSpec extends Specification {
id 'com.github.ben-manes.versions'
}
tasks.dependencyUpdates {
checkConstraints = true
}
repositories {
maven {
url '${mavenRepoUrl}'
Expand All @@ -76,7 +84,7 @@ final class ConstraintsSpec extends Specification {
when:
def result = GradleRunner.create()
.withProjectDir(testProjectDir.root)
.withArguments('dependencyUpdates', '-DcheckConstraints')
.withArguments('dependencyUpdates')
.withPluginClasspath()
.build()

Expand Down

0 comments on commit 81a5d93

Please sign in to comment.