Fix Gradle 8 deprecation

Signed-off-by: shedaniel <daniel@shedaniel.me>
This commit is contained in:
shedaniel
2021-10-28 14:14:11 +08:00
parent 70d4a1d691
commit e5478c1a76
2 changed files with 3 additions and 3 deletions

View File

@@ -518,7 +518,7 @@ public class MinecraftPatchedProvider extends DependencyProvider {
}
getProject().javaexec(spec -> {
spec.setMain("net.minecraftforge.accesstransformer.TransformerProcessor");
spec.getMainClass().set("net.minecraftforge.accesstransformer.TransformerProcessor");
spec.setArgs(args);
spec.setClasspath(classpath);

View File

@@ -123,7 +123,7 @@ public class SpecialSourceExecutor {
spec.setArgs(Arrays.asList(args));
spec.setClasspath(classpath);
spec.workingDir(workingDir.toFile());
spec.setMain("net.md_5.specialsource.SpecialSource");
spec.getMainClass().set("net.md_5.specialsource.SpecialSource");
// if running with INFO or DEBUG logging
if (project.getGradle().getStartParameter().getShowStacktrace() != ShowStacktrace.INTERNAL_EXCEPTIONS
@@ -163,7 +163,7 @@ public class SpecialSourceExecutor {
spec.setArgs(args);
spec.setClasspath(classpath);
spec.workingDir(workingDir.toFile());
spec.setMain("org.cadixdev.vignette.VignetteMain");
spec.getMainClass().set("org.cadixdev.vignette.VignetteMain");
// if running with INFO or DEBUG logging
if (project.getGradle().getStartParameter().getShowStacktrace() != ShowStacktrace.INTERNAL_EXCEPTIONS