Skip to content

Commit 3771d30

Browse files
committed
use the gradle 'application' plug-in to create the distribution.
1 parent d8c96f3 commit 3771d30

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,21 @@ Download
4444
[markdown-writer-fx-0.9.zip](https://github.com/JFormDesigner/markdown-writer-fx/releases/download/0.9/markdown-writer-fx-0.9.zip)
4545
and extract it to any folder.
4646

47-
Double-click `markdown-writer-fx.jar` to start *Markdown Writer FX*.
47+
Run:
48+
- for Windows, ```bin/markdown-writer-fx.bat``` to start *Markdown Writer FX*
49+
- and for Unix systems ```./bin/markdown-writer-fx.sh``` to start *Markdown Writer FX*
4850

49-
If this does not work, try following command in a terminal window:
51+
from the project folder.
5052

53+
Building
54+
-------
55+
Prerequisites are Java 8 and Gradle >= 3.5 in order to build *Markdown Writer FX* form sources.
56+
- get the source, e.g. by cloning the official repo with:
57+
```bash
58+
git clone https://github.com/JFormDesigner/markdown-writer-fx.git
5159
```
52-
java -jar markdown-writer-fx.jar
53-
```
60+
- run ```gradle assembleDist``` to create the distribution in the ```$project/build/distributions/``` folder.
61+
5462

5563
Changes
5664
-------

build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version = '0.9'
22

33
apply plugin: 'java'
4-
apply plugin: 'java-library-distribution'
4+
apply plugin: 'application'
55

66
repositories {
77
jcenter()
@@ -55,6 +55,8 @@ dependencies {
5555
sourceCompatibility = 1.8
5656
targetCompatibility = 1.8
5757

58+
mainClassName = 'org.markdownwriterfx.MarkdownWriterFXApp'
59+
5860
// for RichTextFX submodule
5961
sourceSets {
6062
main.java.srcDirs = ['src/main/java', 'RichTextFX/richtextfx/src/main/java', 'Flowless/src/main/java']
@@ -64,7 +66,7 @@ sourceSets {
6466
jar {
6567
manifest {
6668
attributes( 'Main-Class': 'org.markdownwriterfx.MarkdownWriterFXApp',
67-
'Class-Path': configurations.compile.collect { 'lib/' + it.getName() }.join(' '),
69+
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
6870
'Implementation-Version': version
6971
)
7072
}

0 commit comments

Comments
 (0)