Initial LibGDX project scaffold for ArtLegend

Multi-module Gradle setup targeting Android (S-Pen) and Desktop (Wacom/LWJGL3).
Includes core game stub, Android launcher with immersive mode, and desktop launcher.
Asset directory shared across platforms. Gradle 8.6, Kotlin 1.9.23, LibGDX 1.12.1.
This commit is contained in:
2026-05-04 11:44:40 -07:00
commit 24d78786db
13 changed files with 237 additions and 0 deletions

67
android/build.gradle.kts Normal file
View File

@@ -0,0 +1,67 @@
plugins {
kotlin("android")
id("com.android.application")
}
val gdxVersion: String by project
val natives: Configuration by configurations.creating
android {
namespace = "com.artlegend"
compileSdk = 34
defaultConfig {
applicationId = "com.artlegend"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "0.1.0"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
sourceSets {
getByName("main") {
assets.srcDirs(rootProject.file("assets"))
jniLibs.srcDirs("libs")
}
}
}
dependencies {
implementation(project(":core"))
implementation("com.badlogicgames.gdx:gdx-backend-android:$gdxVersion")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86")
natives("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64")
}
tasks.register("copyAndroidNatives") {
doFirst {
natives.files.forEach { jar ->
val outputDir = file("libs")
outputDir.mkdirs()
copy {
from(zipTree(jar))
into(outputDir)
include("*.so")
eachFile { path = name }
includeEmptyDirs = false
}
}
}
}
tasks.whenTaskAdded {
if (name.contains("package") || name.contains("assemble") || name.contains("bundle")) {
dependsOn("copyAndroidNatives")
}
}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Stylus is preferred but not required — allows install on non-stylus devices -->
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
<application
android:allowBackup="true"
android:label="@string/app_name"
android:theme="@style/GdxTheme">
<activity
android:name=".AndroidLauncher"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout"
android:exported="true"
android:screenOrientation="fullSensor">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,17 @@
package com.artlegend
import android.os.Bundle
import com.badlogic.gdx.backends.android.AndroidApplication
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration
class AndroidLauncher : AndroidApplication() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val config = AndroidApplicationConfiguration().apply {
useImmersiveMode = true
useGyroscope = false
useAccelerometer = false
}
initialize(ArtLegend(), config)
}
}

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ArtLegend</string>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="GdxTheme" parent="android:Theme.NoTitleBar.Fullscreen" />
</resources>