Skip to content

Instantly share code, notes, and snippets.

@keturn
Last active October 2, 2018 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keturn/fff880979e7c19143790cf221b429101 to your computer and use it in GitHub Desktop.
Save keturn/fff880979e7c19143790cf221b429101 to your computer and use it in GitHub Desktop.
sample Gradle Kotlin-DSL build script for libktx project
plugins {
eclipse
idea
kotlin("jvm") version "1.2.71"
}
allprojects {
version = "1.0"
val appName by extra { "MY_PROJECT_NAME" }
val gdxVersion by extra { "1.9.8"}
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots/") }
maven { url = uri("https://oss.sonatype.org/content/repositories/releases/") }
}
}
project(":desktop") {
apply(plugin="kotlin")
val gdxVersion = this.extra["gdxVersion"]
dependencies {
compile(project(":core"))
compile("com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion")
compile("com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop")
compile("com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop")
compile("com.badlogicgames.gdx:gdx-tools:$gdxVersion")
compile("com.badlogicgames.gdx:gdx-controllers-desktop:$gdxVersion")
compile("com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop")
compile(kotlin("stdlib"))
}
}
project(":core") {
apply(plugin="kotlin")
val gdxVersion = this.extra["gdxVersion"]
dependencies {
val ktxVersion = "1.9.8-b5"
compile("com.badlogicgames.gdx:gdx:$gdxVersion")
compile("com.badlogicgames.gdx:gdx-freetype:$gdxVersion")
compile("com.badlogicgames.gdx:gdx-controllers:$gdxVersion")
compile("com.kotcrab.vis:vis-ui:1.3.0")
compile("net.dermetfan.libgdx-utils:libgdx-utils:0.13.4")
compile("com.github.czyzby:gdx-lml:1.9.1.9.6")
compile("com.github.czyzby:gdx-lml-vis:1.9.1.9.6")
compile(kotlin("stdlib"))
compile(group = "io.github.libktx", name = "ktx-app", version = ktxVersion)
compile(group = "io.github.libktx", name = "ktx-assets", version = ktxVersion)
compile(group = "io.github.libktx", name = "ktx-freetype", version = ktxVersion)
compile(group = "io.github.libktx", name = "ktx-graphics", version = ktxVersion)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment