Skip to content

Commit

Permalink
update Dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed Jan 10, 2024
1 parent 02b07c3 commit a5ce4be
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import java.io.File
import java.util.*

object LibExt {
const val groupId = "com.github.xpenatan.gdx-teavm"
val libVersion: String = getVersion("1.0.0", "b9")

val libVersion: String = getVersion()

const val gdxVersion = "1.12.1"
const val teaVMVersion = "0.9.2"
Expand All @@ -14,12 +18,17 @@ object LibExt {
const val aiVersion = "1.8.2"
}

private fun getVersion(releaseVersion: String, suffix: String = ""): String {
private fun getVersion(): String {
val file = File("gradle.properties")
val properties = Properties()
properties.load(file.inputStream())
val version = properties.getProperty("version")

val isRelease = System.getenv("RELEASE")
var libVersion = "${releaseVersion}-SNAPSHOT"
var libVersion = "-SNAPSHOT"
if(isRelease != null && isRelease.toBoolean()) {
libVersion = releaseVersion + if(suffix.isNotEmpty()) "-${suffix}" else ""
libVersion = version
}
System.out.println("Gdx-teaVM Version: " + libVersion)
System.out.println("gdx-teavm Version: $libVersion")
return libVersion
}

0 comments on commit a5ce4be

Please sign in to comment.