|
| 1 | +/* |
| 2 | + * Copyright 2020 The Terasology Foundation |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +plugins { |
| 18 | + id 'de.undercouch.download' version '4.0.4' |
| 19 | +} |
| 20 | + |
1 | 21 | apply from: '../config/gradle/common.gradle' |
| 22 | +apply from: "../config/gradle/jre.gradle" |
2 | 23 |
|
3 | 24 | project.ext.mainClassName = "org.destinationsol.desktop.SolDesktop" |
4 | 25 |
|
@@ -76,6 +97,57 @@ task distZip(type: Zip) { |
76 | 97 | archiveName = "DestinationSol.zip" |
77 | 98 | } |
78 | 99 |
|
| 100 | +task copyLaunchers (type: Copy) { |
| 101 | + description = "Copy launchers into the distribution folder." |
| 102 | + |
| 103 | + from("$rootDir/launcher") |
| 104 | + include("*.sh", "*.exe") |
| 105 | + into("$distsDir/app") |
| 106 | +} |
| 107 | + |
| 108 | +task libsDist(type: Copy) { |
| 109 | + description = "Copy libs directory into the distribution folder." |
| 110 | + |
| 111 | + dependsOn jar |
| 112 | + |
| 113 | + from jar |
| 114 | + from configurations.runtime |
| 115 | + into("$distsDir/app/libs") |
| 116 | +} |
| 117 | + |
| 118 | +task distUnbundledJRE() { |
| 119 | + description = "Creates an application package without any bundled JRE." |
| 120 | + |
| 121 | + dependsOn clean |
| 122 | + dependsOn jar |
| 123 | + dependsOn copyLaunchers |
| 124 | +} |
| 125 | +distUnbundledJRE.finalizedBy libsDist |
| 126 | +distUnbundledJRE.finalizedBy moduleDist |
| 127 | + |
| 128 | +task distZipUnbundledJRE(type: Zip) { |
| 129 | + description = "Creates an application package and zip archive without any bundled JRE." |
| 130 | + |
| 131 | + dependsOn distUnbundledJRE |
| 132 | + from "$distsDir/app" |
| 133 | + archiveName = "DestinationSol.zip" |
| 134 | +} |
| 135 | + |
| 136 | +task distBundleJREs { |
| 137 | + description = "Creates an application package with a bundled JRE." |
| 138 | + |
| 139 | + dependsOn distUnbundledJRE |
| 140 | + dependsOn downloadJreAll |
| 141 | +} |
| 142 | + |
| 143 | +task distZipBundleJREs (type: Zip) { |
| 144 | + description = "Creates an application package and zip archive with a bundled JRE." |
| 145 | + |
| 146 | + dependsOn distBundleJREs |
| 147 | + from "$distsDir/app" |
| 148 | + archiveName = "DestinationSol.zip" |
| 149 | +} |
| 150 | + |
79 | 151 | // TODO: LibGDX Generated config for Eclipse. Needs adjustment for assets not being in the Android facade |
80 | 152 | eclipse { |
81 | 153 | project { |
|
0 commit comments