mirror of
https://github.com/KRTirtho/spotube.git
synced 2026-08-06 04:09:51 +00:00
3.1 KiB
3.1 KiB
AGENTS
Repo shape (KMP + modules)
- Gradle multi-module:
:composeApp(main app),:plugin_interfaces(plugin API contracts),:js_plugin_example(Zipline JS plugin template). :composeAppuses custom KMP source sets (mobileMain,androidJvmMain) with explicitdependsOn; Gradle prints "Default Kotlin Hierarchy Template Not Applied Correctly" warning. Treat as known/expected.
Real app entrypoints
- Desktop/JVM:
composeApp/src/jvmMain/kotlin/dev/krtirtho/spotube/main.kt(mainClass = dev.krtirtho.spotube.MainKt). - Android:
composeApp/src/androidMain/kotlin/dev/krtirtho/spotube/MainActivity.kt. - iOS bridge:
composeApp/src/iosMain/kotlin/dev/krtirtho/spotube/MainViewController.ktandiosApp/iosApp/ContentView.swift.
High-value commands
- Use Gradle wrapper (
./gradlewor./gradlew.bat) only. - Run desktop:
:composeApp:run - Build Android debug:
:composeApp:assembleDebug - Module checks:
:composeApp:check,:plugin_interfaces:check,:js_plugin_example:check - Focused tests:
:composeApp:jvmTest,:composeApp:iosSimulatorArm64Test,:plugin_interfaces:jvmTest,:plugin_interfaces:jsTest,:js_plugin_example:jsTest - No lint/typecheck/formatter tasks are configured;
:composeApp:checkis the only aggregated check.
Dependencies
gradle/libs.versions.tomlis the single source of truth for all version pins and library declarations.- Kotlin:
2.3.0, JVM target:11(compile/target compatibility in bothcomposeApp/build.gradle.ktsandplugin_interfaces/build.gradle.kts).
Codegen and plugin packaging
- JS plugin bundles:
:js_plugin_example:packageDevelopmentPluginand:js_plugin_example:packageProductionPlugin. Output is.smplugfiles injs_plugin_example/build/distributions/. - Zipline plugin entrypoint:
mainFunction = "dev.krtirtho.js_plugin_example.main"injs_plugin_example/build.gradle.kts. Plugin metadata fromjs_plugin_example/plugin.json.
Plugin architecture
plugin_interfacesexportszipline.coreandsemveras API.composeAppdepends on it for the plugin system.plugin_interfacesalso has a JS target (browser()), used by the plugin system.
Desktop JVM specifics
- JavaFX is required;
--add-opensflags incompose.desktop.application.jvmArgsmust be preserved:javafx.graphics/javafx.scene,javafx.graphics/com.sun.javafx.sg.prism,javafx.graphics/com.sun.javafx.scene,javafx.web/com.sun.webkit,javafx.media/com.sun.media.jfxmedia,javafx.media/com.sun.media.jfxmedia.events. - JavaFX dependencies are loaded from OpenJFX with platform classifiers (win/mac/linux) resolved at configuration time via
System.getProperty("os.name").
Tooling
- Gradle config cache enabled (
gradle.properties); prefer module-scoped tasks. - Gradle daemon JVM pinned to JetBrains JDK 21 via
gradle/gradle-daemon-jvm.properties. - Gradle 8.14.3 (from
gradle/wrapper/gradle-wrapper.properties). - Foojay toolchain resolver in use (
plugins { id("org.gradle.toolchains.foojay-resolver-convention") }).
Current testing reality
- No committed
*Test*.ktfiles; test tasks may run zero tests unless new tests are added.