Skip to content

Commit a2843d1

Browse files
committed
Address Space-assignment syntax in Groovy DSL deprecation for url
1 parent 1673a9a commit a2843d1

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

src/gradleTest/simpleplugin/src/test/groovy/simple/DependenciesSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DependenciesSpec extends IntegrationSpec {
1717
buildFile << """\
1818
apply plugin: 'war'
1919
repositories {
20-
maven { url '${mavenrepo.absolutePath}' }
20+
maven { url = '${mavenrepo.absolutePath}' }
2121
}
2222
dependencies {
2323
compile 'testjava:a:0.1.0'

src/main/groovy/nebula/test/dependencies/GradleDependencyGenerator.groovy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ class GradleDependencyGenerator {
3434
publishing {
3535
repositories {
3636
maven {
37-
url "../mavenrepo"
37+
url = "../mavenrepo"
3838
}
3939
ivy {
40-
url "../ivyrepo"
40+
url = "../ivyrepo"
4141
patternLayout {
4242
ivy '[organisation]/[module]/[revision]/[module]-[revision]-ivy.[ext]'
4343
artifact '[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'
@@ -58,10 +58,10 @@ class GradleDependencyGenerator {
5858
publishing {
5959
repositories {
6060
maven {
61-
url "../mavenrepo"
61+
url = "../mavenrepo"
6262
}
6363
ivy {
64-
url "../ivyrepo"
64+
url = "../ivyrepo"
6565
layout('pattern') {
6666
ivy '[organisation]/[module]/[revision]/[module]-[revision]-ivy.[ext]'
6767
artifact '[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'
@@ -116,7 +116,7 @@ class GradleDependencyGenerator {
116116

117117
String getMavenRepositoryBlock() {
118118
"""\
119-
maven { url '${getMavenRepoUrl()}' }
119+
maven { url = '${getMavenRepoUrl()}' }
120120
""".stripIndent()
121121
}
122122

@@ -140,7 +140,7 @@ class GradleDependencyGenerator {
140140
String layoutPattern = isGradleOlderThanGradleFive ? LEGACY_PATTERN_LAYOUT : PATTERN_LAYOUT
141141
return """\
142142
ivy {
143-
url '${getIvyRepoUrl()}'
143+
url = '${getIvyRepoUrl()}'
144144
${layoutPattern} {
145145
ivy '[organisation]/[module]/[revision]/[module]-[revision]-ivy.[ext]'
146146
artifact '[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'

src/main/groovy/nebula/test/dependencies/repositories/MavenRepo.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MavenRepo {
2626

2727
String repoString() {
2828
"""\
29-
maven { url '${root.absolutePath}' }
29+
maven { url = '${root.absolutePath}' }
3030
""".stripIndent()
3131
}
3232

src/test/groovy/nebula/test/IntegrationTestKitSpecSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class IntegrationTestKitSpecSpec extends IntegrationTestKitSpec {
4444
buildFile << """
4545
apply plugin 'java-library'
4646
repositories {
47-
maven { url '${mavenrepo.absolutePath}' }
47+
maven { url = '${mavenrepo.absolutePath}' }
4848
}
4949
dependencies {
5050
implementation 'testjava:a:0.1.0'

src/test/groovy/nebula/test/dependencies/GradleDependencyGeneratorSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class GradleDependencyGeneratorSpec extends Specification {
329329
def generator = new GradleDependencyGenerator(new DependencyGraph(['test.ivy:foo:1.0.0']), 'build/test')
330330
String expectedBlock = """\
331331
ivy {
332-
url '${generator.getIvyRepoUrl()}'
332+
url = '${generator.getIvyRepoUrl()}'
333333
patternLayout {
334334
ivy '[organisation]/[module]/[revision]/[module]-[revision]-ivy.[ext]'
335335
artifact '[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]'
@@ -378,7 +378,7 @@ class GradleDependencyGeneratorSpec extends Specification {
378378
def 'integration spec maven repository block is available'() {
379379
def generator = new GradleDependencyGenerator(new DependencyGraph(['test.maven:foo:1.0.0']), 'build/test')
380380
String expectedBlock = """\
381-
maven { url '${generator.getMavenRepoUrl()}' }
381+
maven { url = '${generator.getMavenRepoUrl()}' }
382382
""".stripIndent()
383383

384384
when:

0 commit comments

Comments
 (0)