Skip to content

Commit bdcad97

Browse files
authored
chore: remove relocation block (#145)
1 parent de1fd29 commit bdcad97

1 file changed

Lines changed: 15 additions & 37 deletions

File tree

build.gradle

Lines changed: 15 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ version = '3.0.1-SNAPSHOT' // x-release-please-version
1616

1717
java {
1818
toolchain {
19-
languageVersion = JavaLanguageVersion.of(21)
19+
languageVersion = JavaLanguageVersion.of 21
2020
}
2121
}
2222

@@ -69,7 +69,7 @@ testing {
6969

7070
runtimeOnly 'org.junit.platform:junit-platform-launcher'
7171

72-
project.dependencies.add('mockitoAgent', platform('org.mockito:mockito-bom:5.23.0'))
72+
project.dependencies.add 'mockitoAgent', platform('org.mockito:mockito-bom:5.23.0')
7373
project.dependencies.add('mockitoAgent', 'org.mockito:mockito-core') {
7474
transitive = false
7575
}
@@ -78,7 +78,7 @@ testing {
7878

7979
integrationTest(JvmTestSuite) {
8080
configurations.named(sources.implementationConfigurationName) {
81-
extendsFrom(configurations.implementation)
81+
extendsFrom configurations.implementation
8282
}
8383

8484
dependencies {
@@ -90,7 +90,7 @@ testing {
9090
targets {
9191
configureEach {
9292
testTask.configure {
93-
shouldRunAfter(test)
93+
shouldRunAfter test
9494
}
9595
}
9696
}
@@ -113,7 +113,7 @@ tasks.withType(JavaCompile).configureEach {
113113
error 'NullAway'
114114
}
115115

116-
if (project.hasProperty("strict")) {
116+
if (project.hasProperty 'strict') {
117117
options.compilerArgs << '-Werror'
118118
}
119119
}
@@ -135,44 +135,22 @@ integrationTest {
135135
finalizedBy jacocoTestReport
136136
}
137137

138-
//TODO: move 'publishing' outside the `afterEvaluate` block once the relocation is no longer needed
139-
afterEvaluate {
140-
publishing {
141-
publications {
142-
withType(MavenPublication).configureEach {
143-
artifacts.removeAll { it.classifier == 'all' }
138+
publishing {
139+
publications {
140+
withType(MavenPublication).configureEach {
141+
artifacts.removeAll { it.classifier == 'all' }
144142

145-
versionMapping {
146-
allVariants {
147-
fromResolutionResult()
148-
}
143+
versionMapping {
144+
allVariants {
145+
fromResolutionResult()
149146
}
150147
}
151-
152-
// publications.removeAll { it.name != 'relocation' }
153-
//
154-
// //TODO: remove the 'relocation' block once the artifact is relocated to the new coordinates
155-
// relocation(MavenPublication) {
156-
// groupId = 'com.github.yvasyliev'
157-
// artifactId = 'deezer-api'
158-
// version = '3.0.0'
159-
//
160-
// pom {
161-
// distributionManagement {
162-
// relocation {
163-
// groupId = 'io.github.yvasyliev'
164-
// artifactId = 'dz4j'
165-
// message = 'This artifact has been relocated to io.github.yvasyliev:dz4j'
166-
// }
167-
// }
168-
// }
169-
// }
170148
}
171149
}
172150
}
173151

174152
mavenPublishing {
175-
publishToMavenCentral(false, DeploymentValidation.NONE)
153+
publishToMavenCentral false, DeploymentValidation.NONE
176154
signAllPublications()
177155

178156
coordinates project.group.toString(), project.name, project.version.toString()
@@ -211,7 +189,7 @@ mavenPublishing {
211189
}
212190

213191
withXml {
214-
asNode().get('dependencyManagement').each { it.parent().remove(it) }
192+
asNode().get('dependencyManagement').each { it.parent().remove it }
215193
}
216194
}
217195
}
@@ -233,7 +211,7 @@ tasks.withType(AbstractArchiveTask).configureEach {
233211
tasks.register('signShadowJar', Sign) {
234212
description = 'Signs the shadow JAR artifact.'
235213
dependsOn shadowJar
236-
sign(tasks.shadowJar.archiveFile.get().asFile)
214+
sign tasks.shadowJar.archiveFile.get().asFile
237215
}
238216

239217
tasks.withType(AbstractPublishToMaven).configureEach {

0 commit comments

Comments
 (0)