Skip to content

Commit 67f512b

Browse files
committed
◀️ integrate terminal app template
1 parent ae09ecb commit 67f512b

File tree

5 files changed

+44
-13
lines changed

5 files changed

+44
-13
lines changed

.idea/artifacts/create_compose_app_main_jar.xml

Lines changed: 12 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/kotlinc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

META-INF/MANIFEST.MF

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
Manifest-Version: 1.0
22
Main-Class: com.theapache64.createcomposeapp.MainKt
3+
Class-Path: annotations-13.0.jar kotlin-stdlib-common-1.6.10.jar kotlin-
4+
stdlib-jdk8-1.6.10.jar kotlin-stdlib-jdk7-1.6.10.jar kotlin-stdlib-1.6.
5+
10.jar
36

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"main": "index.js",
88
"preferGlobal": true,
99
"repository": "https://github.com/theapache64/create-compose-app",
10-
"version": "2022.8.29",
10+
"version": "2022.12.19",
1111
"jdeploy": {},
1212
"dependencies": {
1313
"shelljs": "0.8.4"

src/main/kotlin/com/theapache64/createcomposeapp/Main.kt

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import kotlin.io.path.Path
1010
import kotlin.io.path.div
1111

1212
private const val IS_DEBUG = false
13-
private const val VERSION = "2022.8.29"
13+
private const val VERSION = "2022.12.19"
1414

1515
enum class Platform(val title: String) {
1616
Android("🤖 Android"),
@@ -19,6 +19,7 @@ enum class Platform(val title: String) {
1919
Wasm("🌐 Wasm"),
2020
ChromeExt("🔌 Chrome extension"),
2121
DesktopGame("🎮 Desktop (game)"),
22+
Terminal("⌨️ Terminal")
2223
}
2324

2425

@@ -51,9 +52,9 @@ fun main(args: Array<String>) {
5152
Platform.Wasm -> createComposeWasmApp()
5253
Platform.ChromeExt -> createChromeExtensionApp()
5354
Platform.DesktopGame -> createDesktopGameApp()
55+
Platform.Terminal -> createTerminalApp()
5456
}
5557
}
56-
5758
fun createAndroidApp() {
5859
val corvette = Corvette(
5960
githubRepoUrl = "https://github.com/theapache64/compose-android-template",
@@ -174,4 +175,23 @@ private fun createDesktopGameApp() {
174175

175176
corvette.start(replaceMap)
176177
println(Color.YELLOW, "Run `./gradlew run` from project root to run the game")
178+
}
179+
180+
private fun createTerminalApp() {
181+
val corvette = Corvette(
182+
githubRepoUrl = "https://github.com/theapache64/compose-terminal-template",
183+
isDebug = IS_DEBUG,
184+
modules = arrayOf("src"),
185+
srcDirs = arrayOf("main"),
186+
srcPackagePath = Path("com") / "myterminal"
187+
)
188+
189+
val replaceMap = mapOf(
190+
"rootProject.name = \"compose-terminal-template\"" to "rootProject.name = \"${corvette.projectDirName}\"", // settings.gradle.kt
191+
"mainClass.set(\"com.myterminal.app.AppKt\")" to "mainClass.set(\"${corvette.packageName}.app.AppKt\")",
192+
"com.myterminal" to corvette.packageName, // app kt files
193+
)
194+
195+
corvette.start(replaceMap)
196+
println(Color.YELLOW, "Run `./gradlew run` from project root to run the app")
177197
}

0 commit comments

Comments
 (0)