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
  • Loading branch information
NiccoMlt committed Mar 26, 2021
1 parent c338640 commit 4a2cf7e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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 @@ -42,6 +42,14 @@ dependencies {
application {
// Define the main class for the application.
mainClass.set("it.unibo.sampleapp.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 {
Expand Down

0 comments on commit 4a2cf7e

Please sign in to comment.