Skip to content

Commit c186d8b

Browse files
Fixed review comments.
1 parent 13d27c1 commit c186d8b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

buildSrc/src/main/kotlin/datadog/gradle/plugin/muzzle/VersionSet.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class VersionSet(versions: Collection<Version>) {
3030
return resultSet.map { it.version }
3131
}
3232

33-
class ParsedVersion(val version: Version) : Comparable<ParsedVersion> {
33+
internal class ParsedVersion(val version: Version) : Comparable<ParsedVersion> {
3434
companion object {
3535
private val dotPattern = Regex("\\.")
3636
private const val VERSION_SHIFT = 12

buildSrc/src/test/kotlin/datadog/gradle/plugin/muzzle/RangeQueryTest.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ class RangeQueryTest {
1212

1313
@Test
1414
fun `test range request`() {
15-
// compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.5.0', ext: 'pom'
15+
// compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.5.0', ext: 'pom'
1616
val directiveArtifact: Artifact = DefaultArtifact("org.codehaus.groovy", "groovy-all", "jar", "[2.5.0,2.5.8)")
17-
val rangeRequest = VersionRangeRequest()
18-
rangeRequest.setRepositories(MuzzleMavenRepoUtils.MUZZLE_REPOS)
19-
rangeRequest.setArtifact(directiveArtifact)
17+
val rangeRequest = VersionRangeRequest().apply {
18+
repositories = MuzzleMavenRepoUtils.MUZZLE_REPOS
19+
artifact = directiveArtifact
20+
}
2021

2122
// This call makes an actual network request, which may fail if network access is limited.
2223
val rangeResult = system.resolveVersionRange(session, rangeRequest)

0 commit comments

Comments
 (0)