diff options
| author | 2020-08-19 01:02:17 -0700 | |
|---|---|---|
| committer | 2020-08-19 04:02:17 -0400 | |
| commit | 707a24a8c786bf36ff9505468e676f285ab813d1 (patch) | |
| tree | e177ee51314e7c021cba217b6fec88459a78fe63 | |
| parent | Merge pull request #305 from idwtd/patch-1 (diff) | |
| download | enigma-fork-707a24a8c786bf36ff9505468e676f285ab813d1.tar.gz enigma-fork-707a24a8c786bf36ff9505468e676f285ab813d1.tar.xz enigma-fork-707a24a8c786bf36ff9505468e676f285ab813d1.zip | |
Add gradle run tasks (#306)
* Add gradle run tasks
* Bump gradle and use the `mainClass` property
| -rw-r--r-- | enigma-cli/build.gradle | 9 | ||||
| -rw-r--r-- | enigma-server/build.gradle | 10 | ||||
| -rw-r--r-- | enigma-swing/build.gradle | 9 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | plugins { | 1 | plugins { |
| 2 | id 'application' | ||
| 2 | id 'com.github.johnrengelman.shadow' version '5.2.0' | 3 | id 'com.github.johnrengelman.shadow' version '5.2.0' |
| 3 | } | 4 | } |
| 4 | 5 | ||
| @@ -6,7 +7,11 @@ dependencies { | |||
| 6 | implementation project(':enigma') | 7 | implementation project(':enigma') |
| 7 | } | 8 | } |
| 8 | 9 | ||
| 9 | jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.command.Main' | 10 | application { |
| 11 | mainClass = 'cuchaz.enigma.command.Main' | ||
| 12 | } | ||
| 13 | |||
| 14 | jar.manifest.attributes 'Main-Class': application.mainClass | ||
| 10 | 15 | ||
| 11 | publishing { | 16 | publishing { |
| 12 | publications { | 17 | publications { |
| @@ -15,4 +20,4 @@ publishing { | |||
| 15 | publication.artifact shadowJar | 20 | publication.artifact shadowJar |
| 16 | } | 21 | } |
| 17 | } | 22 | } |
| 18 | } \ No newline at end of file | 23 | } |
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 @@ | |||
| 1 | plugins { | ||
| 2 | id 'application' | ||
| 3 | } | ||
| 4 | |||
| 1 | dependencies { | 5 | dependencies { |
| 2 | implementation project(':enigma') | 6 | implementation project(':enigma') |
| 3 | implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' | 7 | implementation 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3' |
| 4 | } | 8 | } |
| 5 | 9 | ||
| 6 | jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.network.DedicatedEnigmaServer' | 10 | application { |
| 11 | mainClass = 'cuchaz.enigma.network.DedicatedEnigmaServer' | ||
| 12 | } | ||
| 13 | |||
| 14 | 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 @@ | |||
| 1 | plugins { | 1 | plugins { |
| 2 | id 'application' | ||
| 2 | id 'com.github.johnrengelman.shadow' version '5.2.0' | 3 | id 'com.github.johnrengelman.shadow' version '5.2.0' |
| 3 | } | 4 | } |
| 4 | 5 | ||
| @@ -13,7 +14,11 @@ dependencies { | |||
| 13 | implementation 'org.drjekyll:fontchooser:2.4' | 14 | implementation 'org.drjekyll:fontchooser:2.4' |
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | jar.manifest.attributes 'Main-Class': 'cuchaz.enigma.gui.Main' | 17 | application { |
| 18 | mainClass = 'cuchaz.enigma.gui.Main' | ||
| 19 | } | ||
| 20 | |||
| 21 | jar.manifest.attributes 'Main-Class': application.mainClass | ||
| 17 | 22 | ||
| 18 | publishing { | 23 | publishing { |
| 19 | publications { | 24 | publications { |
| @@ -22,4 +27,4 @@ publishing { | |||
| 22 | publication.artifact shadowJar | 27 | publication.artifact shadowJar |
| 23 | } | 28 | } |
| 24 | } | 29 | } |
| 25 | } \ No newline at end of file | 30 | } |
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 @@ | |||
| 1 | distributionBase=GRADLE_USER_HOME | 1 | distributionBase=GRADLE_USER_HOME |
| 2 | distributionPath=wrapper/dists | 2 | distributionPath=wrapper/dists |
| 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip | 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip |
| 4 | zipStoreBase=GRADLE_USER_HOME | 4 | zipStoreBase=GRADLE_USER_HOME |
| 5 | zipStorePath=wrapper/dists | 5 | zipStorePath=wrapper/dists |