mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 07:55:28 +00:00
fix bootstrap addon packaging
This commit is contained in:
parent
c29dac9847
commit
1c9724c232
@ -57,7 +57,9 @@ fun Project.configureDistribution() {
|
||||
val jar = (addonProject.tasks.named("jar").get() as Jar)
|
||||
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)
|
||||
FileInputStream(jar.archiveFile.get().asFile).copyTo(zip)
|
||||
zip.closeEntry()
|
||||
|
@ -150,6 +150,7 @@ public abstract class AbstractPlatform implements Platform {
|
||||
} catch(IOException e) {
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
logger.debug("Copying resource {}", resourcePath);
|
||||
try(InputStream is = getClass().getResourceAsStream("/" + resourcePath);
|
||||
OutputStream os = new FileOutputStream(resource)) {
|
||||
IOUtils.copy(is, os);
|
||||
|
Loading…
x
Reference in New Issue
Block a user