From 707a24a8c786bf36ff9505468e676f285ab813d1 Mon Sep 17 00:00:00 2001 From: idwtd Date: Wed, 19 Aug 2020 01:02:17 -0700 Subject: Add gradle run tasks (#306) * Add gradle run tasks * Bump gradle and use the `mainClass` property--- enigma-cli/build.gradle | 9 +++++++-- enigma-server/build.gradle | 10 +++++++++- enigma-swing/build.gradle | 9 +++++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/enigma-cli/build.gradle b/enigma-cli/build.gradle index 8de307e..3490613 100644 --- a/enigma-cli/build.gradle +++ b/enigma-cli/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'application' id 'com.github.johnrengelman.shadow' version '5.2.0' } @@ -6,7 +7,11 @@ dependencies { implementation project(':enigma') } -jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.command.Main' +application { + mainClass = 'cuchaz.enigma.command.Main' +} + +jar.manifest.attributes 'Main-Class': application.mainClass publishing { publications { @@ -15,4 +20,4 @@ publishing { publication.artifact shadowJar } } -} \ No newline at end of file +} diff --git a/enigma-server/build.gradle b/enigma-server/build.gradle index bf72b18..c447138 100644 --- a/enigma-server/build.gradle +++ b/enigma-server/build.gradle @@ -1,6 +1,14 @@ +plugins { + id 'application' +} + dependencies { implementation project(':enigma') implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' } -jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.network.DedicatedEnigmaServer' +application { + mainClass = 'cuchaz.enigma.network.DedicatedEnigmaServer' +} + +jar.manifest.attributes 'Main-Class': application.mainClass diff --git a/enigma-swing/build.gradle b/enigma-swing/build.gradle index 6d2cd5f..f776903 100644 --- a/enigma-swing/build.gradle +++ b/enigma-swing/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'application' id 'com.github.johnrengelman.shadow' version '5.2.0' } @@ -13,7 +14,11 @@ dependencies { implementation 'org.drjekyll:fontchooser:2.4' } -jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.gui.Main' +application { + mainClass = 'cuchaz.enigma.gui.Main' +} + +jar.manifest.attributes 'Main-Class': application.mainClass publishing { publications { @@ -22,4 +27,4 @@ publishing { publication.artifact shadowJar } } -} \ No newline at end of file +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6623300..fd0c5a3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -- cgit v1.2.3