Skip to content

Commit

Permalink
Gradle build improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tonihele committed Nov 9, 2023
1 parent a2427c0 commit 03c49e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ plugins {
group 'com.mygame'
version '1.0'

mainClassName = "com.mygame.Main"
application {
applicationName = '${name}'
mainClass = 'com.mygame.Main'
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
applicationDefaultJvmArgs = ['-XstartOnFirstThread']
}
}

repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}

Expand Down Expand Up @@ -99,7 +104,7 @@ dependencies {

jar {
manifest {
attributes 'Main-Class': "$mainClassName"
attributes 'Main-Class': application.mainClass
}
}

Expand All @@ -110,5 +115,5 @@ java {
}

wrapper {
gradleVersion = '7.6'
gradleVersion = '8.4'
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ private String[] createSteps() {
// Create build.gradle from template
File gradleBuildFile = new File(dirF, "build.gradle");
Map<String, Object> buildFileBindings = new HashMap<>();
buildFileBindings.put("name", wiz.getProperty("name"));
buildFileBindings.put("jmeVersion", wiz.getProperty("jmeVersion"));
buildFileBindings.put("lwjglLibrary", wiz.getProperty("lwjglLibrary"));
buildFileBindings.put("guiLibrary", wiz.getProperty("guiLibrary"));
Expand Down

0 comments on commit 03c49e4

Please sign in to comment.