SCRIPTING ENGINE · INSTALLATION

KitsuneScript

Silnik skryptowy Kotlin Multiplatform dla Androida, JVM/Desktop, iOS i Web/Wasm.

A Kotlin Multiplatform scripting engine for Android, JVM/Desktop, iOS and Web/Wasm.

Stable 3.0.0 Next 3.0.1-SNAPSHOT

1. Dodaj repozytorium pakietów1. Add the package repository

Dodaj repozytorium do dependencyResolutionManagement w pliku settings.gradle.kts. Dane dostępowe są pobierane wyłącznie ze zmiennych środowiskowych — dokumentacja celowo nie zawiera żadnych wartości kluczy.

Add the repository to dependencyResolutionManagement in settings.gradle.kts. Credentials are read only from environment variables—this documentation intentionally contains no key values.

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven {
            url = uri("https://maven.pkg.github.com/nerdrip/kitsunescript")
            credentials {
                username = providers.environmentVariable("GITHUB_ACTOR").orNull
                password = providers.environmentVariable("GITHUB_TOKEN").orNull
            }
        }
    }
}
Ustaw GITHUB_ACTOR i GITHUB_TOKEN w lokalnym środowisku lub magazynie sekretów CI. Token do pobierania pakietów wymaga uprawnienia read:packages. Nie zapisuj jego wartości w repozytorium. Set GITHUB_ACTOR and GITHUB_TOKEN in your local environment or CI secret store. Package downloads require read:packages. Never store the token value in the repository.

2. Wybierz kanał i dodaj zależność2. Choose a channel and add the dependency

Kotlin Multiplatform Stable 3.x

KitsuneScript jest jednym pełnym artefaktem KMP. Dodaj go do commonMain; Gradle sam wybierze Android, JVM/Desktop, Wasm, iosArm64, iosSimulatorArm64 lub iosX64. Nie dodawaj wygenerowanych współrzędnych z sufiksem platformy.

KitsuneScript is one complete KMP artifact. Add it to commonMain; Gradle selects Android, JVM/Desktop, Wasm, iosArm64, iosSimulatorArm64 or iosX64. Do not declare generated platform-suffixed coordinates.

kotlin {
    sourceSets {
        commonMain.dependencies {
            implementation("rip.nerd.kitsunescript:kitsunescript:3.0.0")
        }
    }
}

Next 3.0.1-SNAPSHOT

commonMain.dependencies {
    implementation("rip.nerd.kitsunescript:kitsunescript:3.0.1-SNAPSHOT")
}

Katalog artefaktówArtifact catalog

ArtifactFunkcja i zakresFunction and scopePlatforms
kitsunescriptLexer, fail-fast and recovering parser, AST, interpreter, execution limits, modules, events, async runtime, debugger, formatter, lint, incremental documents, LSP adapter and Swift-friendly JSON facade.Android, JVM, iOS, Wasm

Nie istnieje okrojony parser iOS ani osobny artefakt kitsunescript-ios. Parser.parse(), parseRecovering() i KitsuneScriptLanguageService pochodzą z tego samego commonMain na każdej platformie.

There is no reduced iOS parser or separate kitsunescript-ios artifact. Parser.parse(), parseRecovering() and KitsuneScriptLanguageService come from the same commonMain on every platform.

Przykłady silnika, parsera, Swift facade i funkcji hosta dla wszystkich source setów: przykłady platformowe HTML.Engine, parser, Swift facade and host-function examples for every source set: HTML platform examples.

3. Zsynchronizuj i sprawdź projekt3. Sync and verify the project

Po zmianie zależności wykonaj synchronizację Gradle, a następnie zbuduj wariant debug aplikacji:

After changing the dependency, sync Gradle and build the app's debug variant:

./gradlew :app:assembleDebug

W systemie Windows użyj gradlew.bat zamiast ./gradlew.

On Windows, use gradlew.bat instead of ./gradlew.

Ręczna publikacja wersjiManual version publishing

Poniższe polecenia są przeznaczone dla opiekuna biblioteki. Wartości poświadczeń pozostają w środowisku lub magazynie sekretów i nie są częścią komendy.

The commands below are for library maintainers. Credential values remain in the environment or secret store and are never part of the command.

Snapshot z gałęzi developSnapshot from the develop branch

./gradlew :kitsunescript:publishAllPublicationsToGitHubPackagesRepository -Psnapshot=true --no-daemon

Buduje wariant deweloperski i publikuje wersję z sufiksem -SNAPSHOT.

Builds the development variant and publishes a version carrying the -SNAPSHOT suffix.

Wersja stabilna z main lub taga wydaniaStable version from main or a release tag

./gradlew :kitsunescript:publishAllPublicationsToGitHubPackagesRepository -Psnapshot=false --no-daemon

Buduje wariant release bez sufiksu. Uruchamiaj wyłącznie z czystego commita przeznaczonego do wydania.

Builds the release variant without a suffix. Run it only from a clean commit intended for release.

Lokalny snapshot do pracyLocal development snapshot

./gradlew :kitsunescript:publishToMavenLocal -Psnapshot=true --no-daemon

Zadanie Maven Local na gałęzi develop publikuje wariant KMP jako rip.nerd.kitsunescript:kitsunescript:3.0.1-local-SNAPSHOT.

On the develop branch, the Maven Local task publishes the KMP variant as rip.nerd.kitsunescript:kitsunescript:3.0.1-local-SNAPSHOT.

Lokalna wersja produkcyjnaLocal production build

./gradlew :kitsunescript:publishToMavenLocal -Psnapshot=false --no-daemon

Publikuje wariant release jako rip.nerd.kitsunescript:kitsunescript:3.0.0-local. Wersja produkcyjna lokalna nie ma sufiksu -SNAPSHOT.

Publishes the release variant as rip.nerd.kitsunescript:kitsunescript:3.0.0-local. A local production build never carries the -SNAPSHOT suffix.

Projekt testowy musi mieć mavenLocal() i używać dokładnej wersji -local. Dzięki osobnym współrzędnym lokalny artefakt nie może zasłonić zdalnego Stable ani Snapshot.The test project must enable mavenLocal() and request the exact -local version. Separate coordinates prevent a local artifact from shadowing remote Stable or Snapshot builds.
repositories { mavenLocal() }

dependencies {
    implementation("rip.nerd.kitsunescript:kitsunescript:3.0.1-local-SNAPSHOT")
}

ZasadyRules

  • *MavenLocal* zawsze dodaje -local; opcja -Plocal=true służy tylko do podglądu wersji, np. przez printPublicationVersion.*MavenLocal* always adds -local; -Plocal=true is only needed to inspect the version, for example with printPublicationVersion.
  • Artefaktów -local nie wolno wysyłać do współdzielonego repozytorium; build zdalnej publikacji jest przed tym zabezpieczony.-local artifacts must never be uploaded to a shared repository; remote publishing fails fast if this is attempted.
  • -local-SNAPSHOT jest nadpisywalny. Przed opublikowaniem zmienionej wersji -local bez Snapshot należy podnieść baseVersion.-local-SNAPSHOT is replaceable. Bump baseVersion before publishing changed -local content without Snapshot.
  • Gałąź develop publikuje 3.0.1-SNAPSHOT; stabilne wydania powstają wyłącznie z tagów.develop publishes 3.0.1-SNAPSHOT; stable releases are created only from tags.