Skip to content

Commit 2baccb5

Browse files
committed
Fix deprecation warnings
Fixes the following deprecation warnings from the builds and CI: Note: /app/src/main/java/com/exercism/report/ReportWriter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. And: Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
1 parent c5b1789 commit 2baccb5

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
plugins {
2-
id 'com.github.johnrengelman.shadow' version '8.1.1'
2+
id 'com.gradleup.shadow' version '9.2.2'
33
id 'java'
44
id 'application'
55
}
66

77
group = "org.exercism"
88
version = "1.0-SNAPSHOT"
9-
mainClassName = 'com.exercism.TestRunner'
9+
10+
tasks.jar {
11+
manifest {
12+
attributes["Main-Class"] = "com.exercism.TestRunner"
13+
}
14+
}
1015

1116
repositories {
1217
mavenCentral()

src/main/java/com/exercism/report/ReportWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public ReportWriter(Path outputDirectory) {
1717
public void report(Report report) {
1818
var mapper = new ObjectMapper();
1919
mapper.registerModule(new Jdk8Module());
20-
mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT);
20+
mapper.setDefaultPropertyInclusion(JsonInclude.Include.NON_ABSENT);
2121
var filePath = this.outputDirectory.resolve("results.json");
2222

2323
try {

0 commit comments

Comments
 (0)