versuch kobweb zu implementieren

This commit is contained in:
2025-09-09 23:34:32 +02:00
parent 0ba27e7e87
commit 77e7fd58ea
14 changed files with 469 additions and 1437 deletions
-85
View File
@@ -1,85 +0,0 @@
# Kobweb Migration Report
## Migration Status: 90% Complete ✅
Das Frontend wurde erfolgreich von Compose for Web auf Kobweb-Architektur umgestellt. Alle wesentlichen Komponenten sind migriert und die Projektstruktur ist korrekt eingerichtet.
## Was wurde erfolgreich umgesetzt:
### 1. ✅ Projektstruktur Migration
- **Alt**: `client/web-app` (Compose for Web + Kotlin/JS)
- **Neu**: `client/kobweb-app` (Kobweb Framework)
- Desktop-App bleibt unverändert und nutzt weiterhin `common-ui`
### 2. ✅ Build-Konfiguration
- Kobweb-Plugins zu `gradle/libs.versions.toml` hinzugefügt
- Kobweb-Abhängigkeiten korrekt definiert
- Repository-Konfiguration für Kobweb-Packages
- `settings.gradle.kts` aktualisiert
### 3. ✅ UI-Komponenten Migration
- **Beibehaltene Business Logic**: `PingService` und `PingViewModel` aus `common-ui` werden weiterverwendet
- **Neue UI-Schicht**: Kobweb-spezifische Komponenten in `pages/Index.kt`
- **Funktionalität**: Alle 4 UI-Zustände (Initial, Loading, Success, Error) implementiert
### 4. ✅ Kobweb-spezifische Dateien
- `Main.kt`: Kobweb-App-Initialisierung mit SilkApp
- `pages/Index.kt`: Hauptseite mit @Page-Annotation
- `.kobweb/conf.yaml`: Kobweb-Konfiguration
- Korrekte Verzeichnisstruktur für Kobweb-Projekt
## Verbleibendes Problem: Plugin-Loading
**Fehler**: `java.lang.NullPointerException` beim Laden des Kobweb-Application-Plugins
**Mögliche Ursachen**:
1. Inkompatibilität zwischen Kobweb-Version und Gradle 9.0.0/Kotlin 2.2.10
2. Kobweb erwartet spezifische JDK-Version oder Build-Umgebung
3. Plugin-Repository-Zugriff oder -Authentifizierung
## Nächste Schritte:
### Option 1: Plugin-Problem beheben
```bash
# Teste mit --stacktrace für detaillierte Fehleranalyse
./gradlew :client:kobweb-app:build --stacktrace
# Oder versuche Kobweb CLI direkt zu installieren
npm install -g @varabyte/kobweb-cli
```
### Option 2: Manuelle Kobweb-Setup
1. Erstelle neues Kobweb-Projekt mit `kobweb create app`
2. Kopiere die migrierten Komponenten
3. Integriere `common-ui` als Abhängigkeit
### Option 3: Alternative Web-Framework
Falls Kobweb weiterhin Probleme bereitet:
- **Compose Multiplatform Web** (aktueller Stand) beibehalten
- **Ktor + HTML DSL** für einfachere Web-Implementierung
- **React Wrapper** für Kotlin/JS
## Code-Qualität der Migration
### ✅ Vorteile der aktuellen Lösung:
- **Saubere Trennung**: Business Logic bleibt in `common-ui`
- **Code-Wiederverwendung**: Desktop und Web teilen dieselbe Logik
- **Kobweb-Best-Practices**: Korrekte Verwendung von @Page, @App, SilkApp
- **Typsichere Navigation**: Kobweb-Routing-System vorbereitet
### ✅ Erhaltene Funktionalität:
- Ping-Backend-Service Integration
- 4-Zustände-UI (Initial/Loading/Success/Error)
- Responsive Layout mit Kobweb-Komponenten
- API-Integration über existing `PingService`
## Fazit
Die Migration ist **technisch vollständig** und **architektonisch korrekt** umgesetzt. Das einzige verbleibende Problem ist ein Plugin-Loading-Issue, das durch:
- Kobweb-CLI-Installation
- Alternative Kobweb-Version
- Oder manuelles Projekt-Setup
gelöst werden kann.
**Die Business Logic und UI-Architektur sind vollständig auf Kobweb migriert!** 🎉
-475
View File
@@ -1,475 +0,0 @@
# 🖥️ Client-Architektur - Meldestelle
## Überblick
Das **Client**-Modul stellt die vollständige Benutzeroberflächen-Lösung für das Meldestelle-System bereit und liefert eine konsistente Erfahrung auf mehreren Plattformen durch Kotlin Multiplatform- und Compose Multiplatform-Technologien.
**Architektur-Highlights:**
- 🌐 **Plattformübergreifend** - Eine einzige Codebasis für Desktop (JVM) und Web (JavaScript) Anwendungen
- 🏗️ **Moderne MVVM** - Umfassende Model-View-ViewModel-Architektur mit ordnungsgemäßer Zustandsverwaltung
- 🧪 **Testabdeckung** - Produktionsbereit mit umfassenden Tests über alle Module
- 🚀 **Optimiert** - Build- und Laufzeit-Optimierungen für Leistung und Entwicklererfahrung
- 🌐 **Kobweb-Framework** - Moderne Web-Anwendung mit Kobweb-Framework für typsichere UI-Entwicklung
---
## Client-Module Struktur
```
client/
├── common-ui/ # Geteilte UI-Komponenten und Geschäftslogik
│ ├── src/commonMain/ # Plattformübergreifende MVVM-Implementierung
│ ├── src/commonTest/ # Umfassende Test-Suite (32 Tests)
│ └── README-CLIENT-COMMON-UI.md # Detaillierte common-ui Dokumentation
├── desktop-app/ # Native Desktop-Anwendung
│ ├── src/jvmMain/ # Desktop-spezifische Implementierung
│ ├── src/jvmTest/ # Desktop-Anwendungs-Tests
│ └── README-CLIENT-DESKTOP-APP.md # Detaillierte desktop-app Dokumentation
├── kobweb-app/ # Kobweb Web Application
│ ├── src/jsMain/ # Kobweb-spezifische Implementierung
│ ├── .kobweb/conf.yaml # Kobweb-Konfiguration
│ └── pages/Index.kt # Hauptseite mit @Page-Annotation
├── KOBWEB-MIGRATION-REPORT.md # Migration von web-app zu kobweb-app
└── README-CLIENT.md # Diese Übersichts-Dokumentation
```
---
## Architektur-Überblick
### Multi-Plattform-Strategie
Die Client-Architektur folgt einem geschichteten Ansatz mit maximaler Code-Wiederverwendung:
```
┌─────────────────────────────────────────────────┐
│ Client-Apps │
├─────────────────┬───────────────────────────────┤
│ Desktop-App │ Kobweb-App │
│ (JVM/Compose) │ (Kobweb Framework) │
├─────────────────┴───────────────────────────────┤
│ Common-UI Modul │
│ (Geteilte MVVM + Geschäftslogik) │
├─────────────────────────────────────────────────┤
│ Plattformspezifische Abhängigkeiten │
│ JVM: Ktor-CIO │ JS: Ktor-JS │
└─────────────────────────────────────────────────┘
```
### MVVM-Implementierung
Die vollständige Client-Architektur implementiert das ordnungsgemäße MVVM-Muster:
- **Model**: Datenmodelle und Services (`PingService`, `PingResponse`)
- **View**: Compose UI-Komponenten (Desktop + Web)
- **ViewModel**: Zustandsverwaltung (`PingViewModel`, `PingUiState`)
### Vier UI-Zustände Implementierung
Gemäß den trace-bullet-guideline.md Spezifikationen:
1. **Initial-Zustand**: `PingUiState.Initial` - Neutrale Nachricht, Button aktiv
2. **Loading-Zustand**: `PingUiState.Loading` - Ladeindikator, Button deaktiviert
3. **Success-Zustand**: `PingUiState.Success` - Positive Antwort, Button aktiv
4. **Error-Zustand**: `PingUiState.Error` - Klare Fehlernachricht, Button aktiv
---
## Schnellstart
### Voraussetzungen
| Tool | Version | Zweck |
|------|---------|-------|
| JDK | 21 (Temurin) | Desktop-Laufzeit und Build-System |
| Node.js | ≥ 20 | Web-Entwicklung und JavaScript-Laufzeit |
| Gradle | 8.x (wrapper) | Build-Automatisierung (enthalten) |
### Entwicklungs-Befehle
```bash
# 🖥️ Desktop-Anwendung
./gradlew :client:desktop-app:run # Desktop-App starten
./gradlew :client:desktop-app:jvmTest # Desktop-Tests ausführen
# 🌐 Kobweb-Anwendung
./gradlew :client:kobweb-app:kobwebStart # Kobweb-Dev-Server starten
./gradlew :client:kobweb-app:build # Kobweb-App erstellen
# 🧩 Common-UI Modul
./gradlew :client:common-ui:jvmTest # Geteilte Logik-Tests ausführen
./gradlew :client:common-ui:build # Geteiltes Modul erstellen
# 🔄 Alle Client-Tests
./gradlew :client:common-ui:jvmTest :client:desktop-app:jvmTest :client:kobweb-app:build
```
---
## Modul-Dokumentation
### 📖 Detaillierte Dokumentations-Links
Jedes Modul hat eine umfassende Dokumentation, die Architektur, Entwicklung, Testing und Deployment abdeckt:
- **[Common-UI Modul](common-ui/README-CLIENT-COMMON-UI.md)** - Geteilte MVVM-Architektur, Services und Geschäftslogik
- **[Desktop-App Modul](desktop-app/README-CLIENT-DESKTOP-APP.md)** - Native Desktop-Anwendung mit plattformübergreifender Distribution
- **[Kobweb Migration Report](KOBWEB-MIGRATION-REPORT.md)** - Details zur Migration von web-app zu kobweb-app (Kobweb Framework)
### 🎯 Wichtige Dokumentations-Abschnitte
Jede Modul-README enthält:
- **Architektur & Struktur** - Detaillierte technische Architektur
- **Entwicklungs-Workflow** - Setup, Build und Testing-Verfahren
- **API-Referenz** - Vollständige API-Dokumentation mit Beispielen
- **Deployment-Leitfaden** - Produktions-Deployment-Anweisungen
- **Fehlerbehebung** - Häufige Probleme und Lösungen
---
## Build & Packaging
### Entwicklungs-Builds
```bash
# Alle Client-Module erstellen
./gradlew :client:build
# Einzelne Module erstellen
./gradlew :client:common-ui:build # Geteilte Komponenten
./gradlew :client:desktop-app:build # Desktop-Anwendung
./gradlew :client:web-app:build # Web-Anwendung
```
### Produktions-Packaging
| Plattform | Befehl | Ausgabe |
|-----------|--------|---------|
| **Desktop** | `./gradlew :client:desktop-app:createDistributable` | Plattformübergreifende Installer |
| **Web** | `./gradlew :client:web-app:jsBrowserProductionWebpack` | Optimiertes PWA-Bundle |
### Distributions-Formate
**Desktop-Anwendung:**
- Linux: `.deb` Pakete
- macOS: `.dmg` Disk-Images
- Windows: `.msi` Installer
**Web-Anwendung:**
- Optimierte JavaScript-Bundles
- PWA-Manifest für App-Installation
- Service Worker bereit (zukünftige Erweiterung)
---
## Konfiguration
### Umgebungs-Konfiguration
Die Client-Anwendungen unterstützen flexible Konfiguration:
| Konfiguration | Desktop | Web | Standardwert |
|---------------|---------|-----|--------------|
| **API Basis-URL** | System-Eigenschaft | Build-Zeit | `http://localhost:8080` |
| **Log-Level** | JVM-Args | Konsole | `INFO` |
### Desktop-Konfiguration
```bash
# Benutzerdefinierte API-URL
./gradlew :client:desktop-app:run -Dmeldestelle.api.url=https://api.production.com
# Entwicklung mit lokalem Backend
./gradlew :client:desktop-app:run -Dmeldestelle.api.url=http://localhost:8080
```
### Web-Konfiguration
Die Web-Anwendungs-Konfiguration wird zur Build-Zeit eingebettet und kann im Build-Prozess angepasst werden.
---
## Test-Strategie
### Umfassende Test-Abdeckung
| Modul | Test-Typ | Anzahl | Abdeckung |
|-------|----------|--------|-----------|
| **Common-UI** | Unit + Integration | 32 | Geschäftslogik, MVVM, Services |
| **Desktop-App** | JVM Integration | 3 | Anwendungsstart, Konfiguration |
| **Web-App** | JavaScript | 4 | Web-spezifische Funktionalität, PWA |
| **Gesamt** | **Plattformübergreifend** | **39** | **Vollständige Client-Abdeckung** |
### Test-Ausführung
```bash
# Alle Client-Tests ausführen
./gradlew :client:common-ui:jvmTest :client:desktop-app:jvmTest :client:web-app:jsTest
# Einzelne Test-Suiten
./gradlew :client:common-ui:jvmTest # Geteilte Geschäftslogik
./gradlew :client:desktop-app:jvmTest # Desktop-spezifische Tests
./gradlew :client:web-app:jsTest # Web/JS-spezifische Tests
```
### Test-Qualitäts-Metriken
- **✅ MVVM-Architektur**: Vollständiges Zustandsverwaltungs-Testing
- **✅ Ressourcenverwaltung**: Memory-Leak-Präventions-Validierung
- **✅ Plattformübergreifend**: Plattformspezifische Integrationstests
- **✅ API-Integration**: HTTP-Service und Serialisierungs-Tests
---
## Leistung & Qualität
### Architektur-Vorteile
**🏗️ MVVM-Implementierung:**
- Ordnungsgemäße Trennung der Belange mit testbaren Komponenten
- Reaktive UI-Zustandsverwaltung mit Compose
- Ressourcen-Lebenszyklus-Verwaltung mit automatischer Bereinigung
**🚀 Laufzeit-Leistung:**
- Effizientes Speichermanagement durch ordnungsgemäße Disposal-Muster
- Optimierte Build-Konfigurationen für beide Plattformen
- Minimaler Overhead mit geteilter Geschäftslogik
**🔧 Entwicklererfahrung:**
- Hot Reload für Desktop- und Web-Entwicklung
- Umfassende Test-Infrastruktur
- Klare Dokumentation und Fehlerbehebungs-Leitfäden
### Qualitätssicherung
- **Test-Abdeckung**: 39 umfassende Tests über alle Client-Module
- **Architektur-Konformität**: 100% MVVM-Muster-Implementierung
- **Build-Optimierung**: Moderne Gradle-Konfiguration mit Abhängigkeitsverwaltung
- **Plattformübergreifend**: Konsistentes Verhalten über Desktop- und Web-Plattformen
---
## Produktionsbereitschaft
### Desktop-Anwendung
**Distributionsbereit:**
- Plattformübergreifende Installer (Linux, macOS, Windows)
- Native Leistung mit JVM-Optimierung
- System-Integrations-Fähigkeiten
**Enterprise-Features:**
- Konfigurierbare API-Endpunkte
- Logging-Integration bereit
- Ressourcenverwaltung und Bereinigung
### Web-Anwendung
**Moderne PWA:**
- Progressive Web App mit Installations-Unterstützung
- Mobile-First responsives Design
- Offline-Fähigkeiten bereit (Service Worker erweiterbar)
**Produktionsstandards:**
- Sicherheits-Header (CSP, XSS-Schutz)
- Leistungsoptimierung (Webpack, Caching)
- SEO und Barrierefreiheits-Konformität
---
## API-Integration
### Geteilter HTTP-Client
Alle Client-Anwendungen verwenden ein konsistentes API-Integrations-Muster:
```kotlin
// Geteilte Service-Schicht
class PingService(
private val baseUrl: String,
private val httpClient: HttpClient
) {
suspend fun ping(): Result<PingResponse>
fun close()
}
// Plattformspezifische Engines
// Desktop: Ktor CIO Engine
// Web: Ktor JS Engine
```
### API-Konfiguration
| Umgebung | API Basis-URL | Konfigurationsmethode |
|----------|---------------|----------------------|
| **Entwicklung** | `http://localhost:8080` | Standard-Konfiguration |
| **Staging** | `https://staging-api.example.com` | System-Eigenschaften / Build-Konfiguration |
| **Produktion** | `https://api.example.com` | System-Eigenschaften / Build-Konfiguration |
---
## Migrations- & Upgrade-Leitfaden
### Von der vorherigen Architektur
Die Client-Architektur wurde vollständig modernisiert:
**Vorher (Komponentenbasiert):**
- Vermischte Belange in UI-Komponenten
- Manuelle Zustandsverwaltung
- Speicherleck-Potenzial
- Begrenzte plattformübergreifende Wiederverwendung
**Aktuell (MVVM):**
- Saubere Architektur mit getrennten Belangen
- Reaktive Zustandsverwaltung mit Compose
- Automatische Ressourcenbereinigung
- Maximale Code-Wiederverwendung über Plattformen
### Breaking Changes
**Keine** - Das Architektur-Upgrade behielt die Rückwärtskompatibilität für alle öffentlichen APIs bei.
---
## Zukünftige Erweiterungen
### Roadmap-Prioritäten
1. **Erweiterte PWA-Features**
- Service Worker-Implementierung für vollständige Offline-Unterstützung
- Push-Benachrichtigungs-Integration
- Hintergrund-Sync-Fähigkeiten
2. **Desktop-Erweiterungen**
- Native System-Integration (Benachrichtigungen, Dateidialoge)
- Auto-Update-Mechanismen
- Erweiterte Logging-Konfiguration
3. **Test-Erweiterung**
- End-to-End-Testing über Plattformen
- Visual Regression Testing
- Performance-Benchmarking
4. **Monitoring-Integration**
- Fehlerberichterstattung und Analytik
- Performance-Überwachung
- Benutzerverhalten-Analytik
---
## Fehlerbehebung
### Häufige Probleme über alle Plattformen
| Problem | Plattform | Lösung |
|---------|-----------|--------|
| API-Verbindungsfehler | Alle | Basis-URL-Konfiguration und Netzwerkkonnektivität überprüfen |
| Build-Fehler | Alle | Build-Verzeichnis bereinigen: `./gradlew clean` |
| Test-Ausführungsprobleme | Alle | Plattformspezifische Anforderungen prüfen (JDK, Node.js) |
| Hot Reload funktioniert nicht | Web | Dev-Server neu starten, File Watcher prüfen |
### Plattformspezifische Probleme
**Desktop:**
- Fenster wird nicht angezeigt → Display-Einstellungen und Fensterzustand prüfen
- SLF4J-Warnungen → Logback-Abhängigkeit hinzufügen (nicht kritisch)
**Web:**
- Weißer Bildschirm beim Laden → Browser-Konsole auf JavaScript-Fehler prüfen
- PWA installiert nicht → HTTPS und manifest.json verifizieren
### Debug-Befehle
```bash
# Umfassende Build-Analyse
./gradlew :client:build --scan
# Abhängigkeitskonflikt-Analyse
./gradlew :client:dependencies
# Ausführliche Test-Ausführung
./gradlew :client:common-ui:jvmTest --info
```
---
## Mitwirken
### Entwicklungs-Workflow
1. **Umgebung einrichten**
```bash
# Voraussetzungen überprüfen
java -version # Sollte JDK 21 anzeigen
node --version # Sollte Node.js ≥ 20 anzeigen
# Erstellen und validieren
./gradlew :client:build
```
2. **Entwicklungsprozess**
```bash
# Üblicher Entwicklungszyklus
./gradlew :client:common-ui:jvmTest # Geteilte Logik testen
./gradlew :client:desktop-app:run # Desktop-Integration testen
./gradlew :client:web-app:jsTest # Web-Kompatibilität testen
```
3. **Qualitätssicherung**
```bash
# Vollständige Test-Suite
./gradlew :client:common-ui:jvmTest :client:desktop-app:jvmTest :client:web-app:jsTest
# Architektur-Validierung
./gradlew :client:build --scan
```
### Code-Standards
- **Architektur**: MVVM-Muster und Trennung der Belange beibehalten
- **Testing**: Tests für neue Funktionalität über alle betroffenen Module hinzufügen
- **Dokumentation**: Modul-spezifische READMEs für Änderungen aktualisieren
- **Kompatibilität**: Sicherstellen, dass Änderungen auf Desktop- und Web-Plattformen funktionieren
### Pull Request Checkliste
- [ ] Alle bestehenden Tests bestehen über alle Client-Module
- [ ] Neue Funktionalität beinhaltet angemessene Test-Abdeckung
- [ ] MVVM-Architektur-Muster beibehalten
- [ ] Plattformübergreifende Kompatibilität verifiziert
- [ ] Modul-spezifische Dokumentation aktualisiert
- [ ] Leistungsauswirkungen bewertet und dokumentiert
---
## Kontakt & Support
### Dokumentations-Struktur
Für detaillierte Informationen zu spezifischen Modulen:
- **Common-UI**: [README-CLIENT-COMMON-UI.md](common-ui/README-CLIENT-COMMON-UI.md)
- **Desktop-App**: [README-CLIENT-DESKTOP-APP.md](desktop-app/README-CLIENT-DESKTOP-APP.md)
- **Web-App**: [README-CLIENT-WEB-APP.md](web-app/README-CLIENT-WEB-APP.md)
### Schnellreferenz
| Aufgabe | Befehl |
|---------|--------|
| Desktop-App starten | `./gradlew :client:desktop-app:run` |
| Web-Dev-Server starten | `./gradlew :client:web-app:jsBrowserDevelopmentRun` |
| Alle Tests ausführen | `./gradlew :client:common-ui:jvmTest :client:desktop-app:jvmTest :client:web-app:jsTest` |
| Für Produktion erstellen | `./gradlew :client:build` |
| Desktop-Installer erstellen | `./gradlew :client:desktop-app:createDistributable` |
| Web-Produktions-Bundle erstellen | `./gradlew :client:web-app:jsBrowserProductionWebpack` |
---
**Client-Status**: ✅ Produktionsbereit
**Architektur**: ✅ MVVM Vollständig
**Test-Abdeckung**: ✅ Umfassend (39 Tests)
**Plattformübergreifend**: ✅ Desktop + Web PWA
**Dokumentation**: ✅ Vollständig
*Zuletzt aktualisiert: 16. August 2025*
+4
View File
@@ -3,8 +3,12 @@ plugins {
alias(libs.plugins.kotlin.serialization)
id("org.jetbrains.compose")
id("org.jetbrains.kotlin.plugin.compose")
id("maven-publish")
}
group = "at.mocode.client"
version = "1.0.0-SNAPSHOT"
kotlin {
jvm()
js(IR) { browser() }
+33 -36
View File
@@ -1,51 +1,48 @@
plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.compose.multiplatform)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose)
}
group = "at.mocode.client.kobweb"
version = "1.0-SNAPSHOT"
kotlin {
js(IR) {
outputModuleName.set("kobweb-app")
browser {
commonWebpackConfig {
outputFileName = "kobweb-app.js"
}
// Configure Java 17 toolchain (required by modern Compose/Kobweb)
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
kobweb {
app {
index {
description.set("Meldestelle Kobweb Application")
}
}
}
kotlin {
js {
moduleName = "kobweb-app"
compilerOptions.target = "es2015"
browser()
binaries.executable()
}
@Suppress("UNUSED_VARIABLE") // Suppress spurious warnings about the outputs not being used anywhere
sourceSets {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
}
jsMain.dependencies {
implementation(libs.compose.runtime)
implementation(libs.kobweb.core)
implementation(libs.kobweb.silk.core)
implementation(libs.kobwebx.markdown)
implementation(libs.compose.html.core)
// Common UI module via published artifact (decoupled build)
implementation("at.mocode.client:common-ui:1.0.0-SNAPSHOT")
// Additional web-specific dependencies
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.js)
}
val jsMain by getting {
dependencies {
// Kobweb dependencies
implementation(libs.kobweb.core)
implementation(libs.kobweb.silk.core)
implementation(libs.kobwebx.markdown)
// Compose HTML (CSS, DOM)
implementation(libs.compose.html.core)
// Common UI module (preserving business logic)
implementation(project(":client:common-ui"))
// Additional web-specific dependencies
implementation(libs.kotlinx.coroutines.core)
implementation(libs.ktor.client.js)
}
}
}
}
+9
View File
@@ -0,0 +1,9 @@
kotlin.code.style=official
# It seems that live reloading + Compose stresses Gradle out, causing occasional memory dumps, so we give it a bit more
# memory for a better user experience.
org.gradle.jvmargs=-Xmx2048m
org.gradle.caching=true
# Disable configuration cache due to Kobweb plugin 0.23.0 incompatibility causing NPE on apply
org.gradle.configuration-cache=false
@@ -0,0 +1,30 @@
[versions]
kobweb = "0.23.0"
jetbrains-compose = "1.6.11"
kotlin = "1.9.23"
kotlinx = "1.8.1"
ktor = "3.2.3"
[libraries]
kobweb-core = { module = "com.varabyte.kobweb:kobweb-core", version.ref = "kobweb" }
kobweb-silk-core = { module = "com.varabyte.kobweb:kobweb-silk", version.ref = "kobweb" }
kobwebx-markdown = { module = "com.varabyte.kobwebx:kobwebx-markdown", version.ref = "kobweb" }
kobweb-silk-icons-fa = { module = "com.varabyte.kobwebx:silk-icons-fa", version.ref = "kobweb" }
compose-html-core = { module = "org.jetbrains.compose.html:html-core", version.ref = "jetbrains-compose" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jetbrains-compose" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx" }
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
[plugins]
kobweb-application = { id = "com.varabyte.kobweb.application", version.ref = "kobweb" }
kobwebx-markdown = { id = "com.varabyte.kobwebx.markdown", version.ref = "kobweb" }
compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
Binary file not shown.
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+251
View File
@@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
+94
View File
@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+21
View File
@@ -0,0 +1,21 @@
rootProject.name = "kobweb-app"
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public")
}
}
dependencyResolutionManagement {
@Suppress("UnstableApiUsage")
repositories {
google()
mavenLocal()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://us-central1-maven.pkg.dev/varabyte-repos/public")
}
}
@@ -4,7 +4,6 @@ import androidx.compose.runtime.*
import com.varabyte.kobweb.compose.foundation.layout.Box
import com.varabyte.kobweb.compose.ui.Alignment
import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.*
import com.varabyte.kobweb.silk.components.text.SpanText
import kotlinx.coroutines.delay
+18 -839
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -59,7 +59,8 @@ include(":temp:ping-service")
// Client modules
include(":client:common-ui")
include(":client:kobweb-app")
// kobweb-app is now an independent build with its own Gradle wrapper (8.14.2). See client/kobweb-app/README.md for details.
//include(":client:kobweb-app")
include(":client:desktop-app")
// Documentation module