mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
fix bootstrap addon packaging
This commit is contained in:
@@ -57,7 +57,9 @@ fun Project.configureDistribution() {
|
|||||||
val jar = (addonProject.tasks.named("jar").get() as Jar)
|
val jar = (addonProject.tasks.named("jar").get() as Jar)
|
||||||
println("Packaging addon ${jar.archiveFileName.get()} to ${dest.absolutePath}.")
|
println("Packaging addon ${jar.archiveFileName.get()} to ${dest.absolutePath}.")
|
||||||
|
|
||||||
val entry = ZipEntry("addons/${jar.archiveFileName.get()}")
|
val boot = if(addonProject.project.extra.has("bootstrap") && addonProject.project.extra.get("bootstrap") as Boolean) "bootstrap/" else ""
|
||||||
|
|
||||||
|
val entry = ZipEntry("addons/$boot${jar.archiveFileName.get()}")
|
||||||
zip.putNextEntry(entry)
|
zip.putNextEntry(entry)
|
||||||
FileInputStream(jar.archiveFile.get().asFile).copyTo(zip)
|
FileInputStream(jar.archiveFile.get().asFile).copyTo(zip)
|
||||||
zip.closeEntry()
|
zip.closeEntry()
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ public abstract class AbstractPlatform implements Platform {
|
|||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
throw new UncheckedIOException(e);
|
throw new UncheckedIOException(e);
|
||||||
}
|
}
|
||||||
|
logger.debug("Copying resource {}", resourcePath);
|
||||||
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
||||||
OutputStream os = new FileOutputStream(resource)) {
|
OutputStream os = new FileOutputStream(resource)) {
|
||||||
IOUtils.copy(is, os);
|
IOUtils.copy(is, os);
|
||||||
|
|||||||
Reference in New Issue
Block a user