Skip to content

Commit 3e1dd93

Browse files
Copilotandimarek
andcommitted
Fix deprecation warnings for Gradle 9 compatibility
Co-authored-by: andimarek <1706744+andimarek@users.noreply.github.com>
1 parent 4db3cc4 commit 3e1dd93

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

build.gradle

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ dependencies {
127127
implementation 'org.antlr:antlr4-runtime:' + antlrVersion
128128
implementation 'com.google.guava:guava:' + guavaVersion
129129

130-
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
130+
testImplementation 'junit:junit:4.13.2'
131131
testImplementation 'org.spockframework:spock-core:2.3-groovy-4.0'
132132
testImplementation 'net.bytebuddy:byte-buddy:1.17.8'
133133
testImplementation 'org.objenesis:objenesis:3.4'
@@ -241,9 +241,10 @@ task buildNewJar(type: Jar) {
241241
manifest {
242242
from file("build/extract/META-INF/MANIFEST.MF")
243243
}
244+
def projectVersion = version
244245
doLast {
245-
delete("build/libs/graphql-java-${project.version}.jar")
246-
file("build/libs/graphql-java-tmp.jar").renameTo(file("build/libs/graphql-java-${project.version}.jar"))
246+
delete("build/libs/graphql-java-${projectVersion}.jar")
247+
file("build/libs/graphql-java-tmp.jar").renameTo(file("build/libs/graphql-java-${projectVersion}.jar"))
247248
}
248249
}
249250

@@ -321,10 +322,7 @@ javadoc {
321322
options.encoding = 'UTF-8'
322323
}
323324

324-
artifacts {
325-
archives sourcesJar
326-
archives javadocJar
327-
}
325+
// Removed deprecated archives configuration in favor of direct assemble dependencies
328326

329327
List<TestDescriptor> failedTests = []
330328
Map<String, Integer> testsAndTime = [:]
@@ -431,7 +429,7 @@ publishing {
431429
publications {
432430

433431
graphqlJava(MavenPublication) {
434-
version version
432+
version = version
435433
from components.java
436434

437435
artifact sourcesJar {
@@ -496,7 +494,7 @@ nexusPublishing {
496494
}
497495

498496
signing {
499-
required { !project.hasProperty('publishToMavenLocal') }
497+
setRequired { !project.hasProperty('publishToMavenLocal') }
500498
def signingKey = System.env.MAVEN_CENTRAL_PGP_KEY
501499
useInMemoryPgpKeys(signingKey, "")
502500
sign publishing.publications

0 commit comments

Comments
 (0)