Skip to content

Commit 427ca94

Browse files
committed
Add Gradle task to build distribution without a bundled JRE.
1 parent d02817a commit 427ca94

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

desktop/build.gradle

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,42 @@ task distZip(type: Zip) {
7676
archiveName = "DestinationSol.zip"
7777
}
7878

79+
task copyLaunchers (type: Copy) {
80+
description = "Copy launchers into the distribution folder."
81+
82+
from("$rootDir/launcher")
83+
include("*.sh", "*.exe")
84+
into("$distsDir/app")
85+
}
86+
87+
task libsDist(type: Copy) {
88+
description = "Copy libs directory into the distribution folder."
89+
90+
dependsOn jar
91+
92+
from jar
93+
from configurations.runtime
94+
into("$distsDir/app/libs")
95+
}
96+
97+
task distUnbundledJRE() {
98+
description = "Creates an application package without any bundled JRE."
99+
100+
dependsOn clean
101+
dependsOn jar
102+
dependsOn copyLaunchers
103+
}
104+
distUnbundledJRE.finalizedBy libsDist
105+
distUnbundledJRE.finalizedBy moduleDist
106+
107+
task distUnbundledJREZip(type: Zip) {
108+
description = "Creates an application package and zip archive without any bundled JRE."
109+
110+
dependsOn distUnbundledJRE
111+
from "$distsDir/app"
112+
archiveName = "DestinationSol.zip"
113+
}
114+
79115
// TODO: LibGDX Generated config for Eclipse. Needs adjustment for assets not being in the Android facade
80116
eclipse {
81117
project {

0 commit comments

Comments
 (0)