changed package name, added java packager to gradle
|
@ -6,6 +6,15 @@
|
||||||
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
|
* User Manual available at https://docs.gradle.org/8.0.2/userguide/building_java_projects.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'io.github.fvarrui:javapackager:1.7.2'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
|
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
|
||||||
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
|
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
|
||||||
|
@ -17,6 +26,8 @@ plugins {
|
||||||
id 'distribution'
|
id 'distribution'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply plugin: 'io.github.fvarrui.javapackager.plugin'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// Use Maven Central for resolving dependencies.
|
// Use Maven Central for resolving dependencies.
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -43,28 +54,53 @@ dependencies {
|
||||||
application {
|
application {
|
||||||
// Define the main class for the application.
|
// Define the main class for the application.
|
||||||
mainClass = 'xyz.brysonsteck.servercraft.MainKt'
|
mainClass = 'xyz.brysonsteck.servercraft.MainKt'
|
||||||
|
applicationName = "ServerCraft"
|
||||||
}
|
}
|
||||||
|
|
||||||
distTar {
|
distTar {
|
||||||
compression = Compression.GZIP
|
compression = Compression.GZIP
|
||||||
archiveFileName = 'ServerCraft.tar.gz'
|
|
||||||
}
|
|
||||||
|
|
||||||
distZip {
|
|
||||||
archiveFileName = 'ServerCraft.zip'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
archiveFileName = 'ServerCraft.jar'
|
archiveFileName = 'ServerCraft.jar'
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': application.mainClass
|
attributes 'Main-Class': application.mainClass
|
||||||
}
|
}
|
||||||
|
|
||||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||||
from {
|
from {
|
||||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task pack(type: io.github.fvarrui.javapackager.gradle.PackageTask, dependsOn: build) {
|
||||||
|
mainClass = 'xyz.brysonsteck.servercraft.MainKt'
|
||||||
|
bundleJre = true
|
||||||
|
generateInstaller = true
|
||||||
|
administratorRequired = false
|
||||||
|
|
||||||
|
linuxConfig {
|
||||||
|
pngFile = 'file:app/src/main/resources/icon.png'
|
||||||
|
}
|
||||||
|
|
||||||
|
macConfig {
|
||||||
|
icnsFile = app/src/main/resources/icon.icns
|
||||||
|
volumeIcon = 'app/src/main/resources/icon.icns'
|
||||||
|
backgroundImage = 'app/src/main/resources/dmg.png'
|
||||||
|
developerId = 'Bryson Steck'
|
||||||
|
appId = 'xyz.brysonsteck.ServerCraft'
|
||||||
|
}
|
||||||
|
|
||||||
|
winConfig {
|
||||||
|
icoFile = app/src/main/resources/icon.ico
|
||||||
|
setupMode = 'askTheUser'
|
||||||
|
disableDirPage = false
|
||||||
|
disableFinishedPage = false
|
||||||
|
disableWelcomePage = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tasks.named('test') {
|
tasks.named('test') {
|
||||||
// Use JUnit Platform for unit tests.
|
// Use JUnit Platform for unit tests.
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
|
|
BIN
app/src/main/resources/dmg.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
app/src/main/resources/icon.icns
Normal file
BIN
app/src/main/resources/icon.ico
Normal file
After Width: | Height: | Size: 264 KiB |
BIN
app/src/main/resources/icon.png
Normal file
After Width: | Height: | Size: 209 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5 KiB After Width: | Height: | Size: 5 KiB |
|
@ -7,5 +7,5 @@
|
||||||
* in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html
|
* in the user manual at https://docs.gradle.org/8.0.2/userguide/multi_project_builds.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
rootProject.name = 'servercraft'
|
rootProject.name = 'ServerCraft'
|
||||||
include('app')
|
include('app')
|
||||||
|
|