changed package name, added java packager to gradle

This commit is contained in:
Bryson Steck 2023-05-15 20:05:43 -06:00
parent b7ef7feebb
commit bc65a6a44c
18 changed files with 42 additions and 6 deletions

View file

@ -6,6 +6,15 @@
* 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 {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm' version '1.8.0'
@ -17,6 +26,8 @@ plugins {
id 'distribution'
}
apply plugin: 'io.github.fvarrui.javapackager.plugin'
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
@ -43,28 +54,53 @@ dependencies {
application {
// Define the main class for the application.
mainClass = 'xyz.brysonsteck.servercraft.MainKt'
applicationName = "ServerCraft"
}
distTar {
compression = Compression.GZIP
archiveFileName = 'ServerCraft.tar.gz'
}
distZip {
archiveFileName = 'ServerCraft.zip'
}
jar {
archiveFileName = 'ServerCraft.jar'
manifest {
attributes 'Main-Class': application.mainClass
}
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from {
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') {
// Use JUnit Platform for unit tests.
useJUnitPlatform()

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

View file

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View file

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -7,5 +7,5 @@
* 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')