Skip to content

Commit

Permalink
fix: add back deprecated mainClassName property
Browse files Browse the repository at this point in the history
waiting for fix from PR johnrengelman/shadow#612 to be released in a new version of com.github.johnrengelman.shadow

(cherry picked from commit 4122bbf7fc8eaca494129dc65f3e380f331f6581)
  • Loading branch information
NiccoMlt committed Mar 26, 2021
1 parent 5b18d8d commit e47ee4e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
// Apply the application plugin to add support for building a CLI application
// You can run your app via task "run": ./gradlew run
application

/*
* Adds tasks to export a runnable jar.
* In order to create it, launch the "shadowJar" task.
Expand Down Expand Up @@ -60,10 +60,17 @@ tasks.withType<Test> {
application {
// Define the main class for the application
mainClass.set("it.unibo.samplejavafx.App")

/*
* mainClassName was deprecated by Gradle, but it is still required by John Engelman's Shadow plugin.
* A pull request with a fix was already merged, but it hasn't been released yet;
* see https://github.com/johnrengelman/shadow/issues/609 and https://github.com/johnrengelman/shadow/pull/612
*/
@Suppress("DEPRECATION")
mainClassName = mainClass.get()
}

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

0 comments on commit e47ee4e

Please sign in to comment.