Skip to content

Build Systems & Dependency Setup

Build automation utilities manage third-party libraries, compile Java source code, run automated tests, and package standalone executable archives.

LITIENGINE is distributed via Maven Central and is fully compatible with modern Gradle (Kotlin & Groovy DSL) and Apache Maven.


Starter Build Configurations (Java 25+)

Select your preferred build tool below for a complete, production-ready configuration:

build.gradle.kts
plugins {
    java
    application
    id("com.gradleup.shadow") version "8.3.6"
}

group = "com.example.game"
version = "1.0.0"

repositories {
    mavenCentral()
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(25))
    }
}

dependencies {
    implementation("de.gurkenlabs:litiengine:0.13.0")
    testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
}

application {
    mainClass.set("com.example.game.Program")
    applicationDefaultJvmArgs = listOf("--enable-native-access=ALL-UNNAMED")
}

tasks.shadowJar {
    archiveClassifier.set("all")
    manifest {
        attributes["Main-Class"] = "com.example.game.Program"
    }
}
build.gradle
plugins {
    id 'java'
    id 'application'
    id 'com.gradleup.shadow' version '8.3.6'
}

group = 'com.example.game'
version = '1.0.0'

repositories {
    mavenCentral()
}

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(25)
    }
}

dependencies {
    implementation 'de.gurkenlabs:litiengine:0.13.0'
    testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
}

application {
    mainClass = 'com.example.game.Program'
    applicationDefaultJvmArgs = ['--enable-native-access=ALL-UNNAMED']
}

tasks.shadowJar {
    archiveClassifier.set('all')
    manifest {
        attributes 'Main-Class': 'com.example.game.Program'
    }
}
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example.game</groupId>
    <artifactId>my-litiengine-game</artifactId>
    <version>1.0.0</version>

    <properties>
        <maven.compiler.source>25</maven.compiler.source>
        <maven.compiler.target>25</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>de.gurkenlabs</groupId>
            <artifactId>litiengine</artifactId>
            <version>0.13.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.example.game.Program</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

IDE Setup & Project Importing

  • IntelliJ IDEA


    1. Open IntelliJ and select File → Open....
    2. Choose the root folder containing build.gradle.kts (or pom.xml).
    3. Select Open as Project and let Gradle sync dependencies automatically.
  • Eclipse IDE


    1. Select File → Import... → Existing Gradle Project.
    2. Browse to your project directory and click Finish.
    3. Ensure your Workspace Installed JRE is configured for Java 25+.
  • VS Code


    1. Install the Extension Pack for Java and Gradle Extension for Java.
    2. Open your project folder; VS Code will automatically detect and configure the Gradle wrapper.

See Also