Home

Awesome

gdx-teavm

Build Build Sonatype Nexus (Snapshots) Static Badge

gdx-teavm is a backend solution for running libgdx games in a web browser. It uses TeaVM behind the scene to convert Java/Kotlin bytecode to Javascript.

Note:

TeaVM Examples:

TeaVM Games:

Setup:

// Add sonatype repository to Root gradle
repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
    maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    maven { url "https://teavm.org/maven/repository/" }
    
    // If there is a problem with the teavm repository, you can try using http
    maven {
        url = uri("http://teavm.org/maven/repository/")
        isAllowInsecureProtocol = true
    }
}
// SNAPSHOT:
gdxTeaVMVersion = "-SNAPSHOT"
// RELEASE:
gdxTeaVMVersion = "[LAST_TAG_VERSION]"
// In teaVM module
dependencies {
    implementation "com.github.xpenatan.gdx-teavm:backend-teavm:$project.gdxTeaVMVersion"

    // FreeType extension
    implementation "com.github.xpenatan.gdx-teavm:gdx-freetype-teavm:$project.gdxTeaVMVersion"
}

Supported libraries: