Files
artlegend/android/build.gradle.kts
bill 24d78786db 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.
2026-05-04 11:44:40 -07:00

68 lines
1.7 KiB
Kotlin

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")
}
}