aboutsummaryrefslogtreecommitdiff
path: root/sharedVariables/src/Util.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-08-11 13:22:24 +0200
committerGitHub <noreply@github.com>2024-08-11 13:22:24 +0200
commit8903d9fa783455558d20eb32a2038c87ab5913be (patch)
tree2c925d0ecf625f8e8a5505960d0d51d2201e88e2 /sharedVariables/src/Util.kt
parenta8d4861b051298cc8a1db3c5210a32abab866b1e (diff)
downloadskyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.tar.gz
skyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.tar.bz2
skyhanni-8903d9fa783455558d20eb32a2038c87ab5913be.zip
Add multi version preprocessor (#2283)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'sharedVariables/src/Util.kt')
-rw-r--r--sharedVariables/src/Util.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/sharedVariables/src/Util.kt b/sharedVariables/src/Util.kt
new file mode 100644
index 000000000..750a73cbe
--- /dev/null
+++ b/sharedVariables/src/Util.kt
@@ -0,0 +1,7 @@
+package at.skyhanni.sharedvariables
+
+import org.gradle.jvm.toolchain.JavaLanguageVersion
+
+fun JavaLanguageVersion.versionString() =
+ if (asInt() < 9) "1." + asInt()
+ else asInt().toString()