azurite-engine / Azurite

Azurite Game Engine is a 2D Java game engine built on top of LWJGL.
https://azurite-engine.github.io
MIT License
42 stars 20 forks source link

Gradle buildscript refactor. #82

Closed aemogie closed 2 years ago

aemogie commented 2 years ago
  1. Changed all methods to be called using ( ) and all quotation marks to be ". (Groovy supports ' as well, for some reason.)

  2. Created explicit :wrapper configuration, so all the configuration is in a single file. Uses 7.3.1-bin.

    • To get IntelliJ to use this, go to Settings | Build, Execution, Deployment | Build Tools | Gradle and change Use Gradle from: option to 'wrapper' task in Gradle build script.
    • Note: This will make IntelliJ run the :wrapper task every time you build, or run a Gradle task, so if you don't like that, switch it back. But make sure to run gradle :wrapper manually if you change the wrapper configuration.
  3. Removed redundant project variable referencing.

  4. Extracted the JUnit 4 version as an ext variable.

  5. Upgraded dependencies.

    • JOML 1.10.1 -> 1.10.4
    • JUnit 4.12 -> 4.13.2
  6. Reverted the test source directory from explicit src/main/test to the default src/test/java. (As specified by Maven's Standard Directory Layout)

  7. Removed manual Jar manifest entry.

    • Note: Although the Shadow plugin uses the application plugin for its manifest, the default :jar task doesn't. (Check: gradle/gradle#13125)
  8. Added the MacOS-only JVM argument (-XstartOnFirstThread) to the application { } configuration.

    • I don't own a Mac, therefore I can't check if this works. Can someone else verify?
  9. Changed tasks creation to use tasks.register as the task is then configured only when the task is run. Reduces time used during the "Configuring" phase.

  10. Modified tasks :fatJar and :execute to act as aliases for :shadowJar and :runShadow respectively, as those replace the previous implementations.

athaun commented 2 years ago

fabulous