summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2025-02-14 00:50:01 +0800
committerruki <[email protected]>2025-02-14 00:50:01 +0800
commit5b1f1123af7afc503d5634ae08b07f018931d799 (patch)
treeafda765e18badb4e18391678a029145faaa617c8
parentd262159c14679842aa2c70103f03a46558bb4241 (diff)
add kotlin template
-rw-r--r--xmake/templates/kotlin/console/project/src/main.kt3
-rw-r--r--xmake/templates/kotlin/console/project/xmake.lua10
-rw-r--r--xmake/templates/kotlin/console/template.lua2
3 files changed, 15 insertions, 0 deletions
diff --git a/xmake/templates/kotlin/console/project/src/main.kt b/xmake/templates/kotlin/console/project/src/main.kt
new file mode 100644
index 000000000..543f5ac8f
--- /dev/null
+++ b/xmake/templates/kotlin/console/project/src/main.kt
@@ -0,0 +1,3 @@
+fun main() {
+ println("hello xmake!")
+}
diff --git a/xmake/templates/kotlin/console/project/xmake.lua b/xmake/templates/kotlin/console/project/xmake.lua
new file mode 100644
index 000000000..2689995b1
--- /dev/null
+++ b/xmake/templates/kotlin/console/project/xmake.lua
@@ -0,0 +1,10 @@
+add_rules("mode.debug", "mode.release")
+
+add_requires("kotlin-native")
+
+target("${TARGETNAME}")
+ set_kind("binary")
+ add_files("src/main.kt")
+ set_toolchains("@kotlin-native")
+
+${FAQ}
diff --git a/xmake/templates/kotlin/console/template.lua b/xmake/templates/kotlin/console/template.lua
new file mode 100644
index 000000000..ed2e13b57
--- /dev/null
+++ b/xmake/templates/kotlin/console/template.lua
@@ -0,0 +1,2 @@
+template("console")
+ add_configfiles("xmake.lua")