@@ -16,7 +16,7 @@ class RelocationSpec extends PluginSpecification {
16
16
dependencies {
17
17
implementation 'junit:junit:3.8.2'
18
18
}
19
-
19
+
20
20
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
21
21
relocate 'junit.textui', 'a'
22
22
relocate 'junit.framework', 'b'
@@ -81,7 +81,7 @@ class RelocationSpec extends PluginSpecification {
81
81
dependencies {
82
82
implementation 'junit:junit:3.8.2'
83
83
}
84
-
84
+
85
85
// tag::relocateFilter[]
86
86
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
87
87
relocate('junit.textui', 'a') {
@@ -138,7 +138,7 @@ class RelocationSpec extends PluginSpecification {
138
138
dependencies {
139
139
implementation 'junit:junit:3.8.2'
140
140
}
141
-
141
+
142
142
// tag::relocate[]
143
143
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
144
144
relocate 'junit.framework', 'shadow.junit'
@@ -148,7 +148,7 @@ class RelocationSpec extends PluginSpecification {
148
148
149
149
file(' src/main/java/shadow/ShadowTest.java' ) << '''
150
150
package shadow;
151
-
151
+
152
152
import junit.framework.Test;
153
153
import junit.framework.TestResult;
154
154
public class ShadowTest implements Test {
@@ -185,29 +185,29 @@ class RelocationSpec extends PluginSpecification {
185
185
given : ' Core project with dependency and resource'
186
186
file(' core/build.gradle' ) << """
187
187
apply plugin: 'java-library'
188
-
189
- repositories { maven { url "${ repo.uri} " } }
188
+
189
+ repositories { maven { url = "${ repo.uri} " } }
190
190
dependencies { api 'junit:junit:3.8.2' }
191
191
""" . stripIndent()
192
192
193
193
file(' core/src/main/resources/TEST' ) << ' TEST RESOURCE'
194
194
file(' core/src/main/resources/test.properties' ) << ' name=test'
195
195
file(' core/src/main/java/core/Core.java' ) << '''
196
196
package core;
197
-
197
+
198
198
import junit.framework.Test;
199
-
199
+
200
200
public class Core {}
201
201
''' . stripIndent()
202
202
203
203
and : ' App project with shadow, relocation, and project dependency'
204
204
file(' app/build.gradle' ) << """
205
205
apply plugin: 'java'
206
206
apply plugin: 'com.gradleup.shadow'
207
-
208
- repositories { maven { url "${ repo.uri} " } }
207
+
208
+ repositories { maven { url = "${ repo.uri} " } }
209
209
dependencies { implementation project(':core') }
210
-
210
+
211
211
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
212
212
relocate 'core', 'app.core'
213
213
relocate 'junit.framework', 'app.junit.framework'
@@ -217,10 +217,10 @@ class RelocationSpec extends PluginSpecification {
217
217
file(' app/src/main/resources/APP-TEST' ) << ' APP TEST RESOURCE'
218
218
file(' app/src/main/java/app/App.java' ) << '''
219
219
package app;
220
-
220
+
221
221
import core.Core;
222
222
import junit.framework.Test;
223
-
223
+
224
224
public class App {}
225
225
''' . stripIndent()
226
226
@@ -255,7 +255,7 @@ class RelocationSpec extends PluginSpecification {
255
255
.publish()
256
256
file(' src/main/java/foo/Foo.java' ) << '''
257
257
package foo;
258
-
258
+
259
259
class Foo {}
260
260
''' . stripIndent()
261
261
file(' src/main/resources/foo/foo.properties' ) << ' name=foo'
@@ -264,7 +264,7 @@ class RelocationSpec extends PluginSpecification {
264
264
dependencies {
265
265
implementation 'shadow:dep:1.0'
266
266
}
267
-
267
+
268
268
tasks.named('shadowJar', com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
269
269
relocate 'foo', 'bar'
270
270
}
@@ -296,7 +296,7 @@ class RelocationSpec extends PluginSpecification {
296
296
repositories {
297
297
mavenCentral()
298
298
maven {
299
- url 'https://repository.mapr.com/nexus/content/groups/mapr-public/releases'
299
+ url = 'https://repository.mapr.com/nexus/content/groups/mapr-public/releases'
300
300
}
301
301
}
302
302
0 commit comments