docs: translate remaining architectural guides to German and standardize formatting
Translated all remaining English architectural documents into German, including ADRs, guides, release notes, and reference materials. Standardized formatting across translated files, updated section headings, and localized inline comments within code examples for consistency.
This commit is contained in:
@@ -5,47 +5,47 @@ owner: DevOps Engineer
|
||||
tags: [gradle, kotlin, dsl, build]
|
||||
---
|
||||
|
||||
# Gradle Kotlin DSL Primer
|
||||
# Gradle Kotlin DSL – Einführung
|
||||
|
||||
**Quelle:** [Original Gradle Documentation](https://docs.gradle.org/current/userguide/kotlin_dsl.html)
|
||||
**Quelle:** [Offizielle Gradle-Dokumentation](https://docs.gradle.org/current/userguide/kotlin_dsl.html)
|
||||
**Kontext:** Dieses Dokument dient als Referenz für die im Projekt verwendete Gradle Kotlin DSL. Es fasst die wichtigsten Konzepte und Syntax-Elemente zusammen.
|
||||
|
||||
---
|
||||
|
||||
Gradle’s Kotlin DSL offers an alternative to the traditional Groovy DSL, delivering an enhanced editing experience in supported IDEs.
|
||||
Gradles Kotlin DSL bietet eine Alternative zur traditionellen Groovy DSL und liefert eine verbesserte Editor-Erfahrung in unterstützten IDEs.
|
||||
|
||||
## Key Concepts
|
||||
## Wichtige Konzepte
|
||||
|
||||
### Script File Names
|
||||
### Skript-Dateinamen
|
||||
* Groovy DSL: `.gradle`
|
||||
* Kotlin DSL: `.gradle.kts`
|
||||
|
||||
To activate the Kotlin DSL, use the `.gradle.kts` extension for your build scripts, settings file (`settings.gradle.kts`), and initialization scripts (`init.gradle.kts`).
|
||||
Um die Kotlin DSL zu aktivieren, wird die Erweiterung `.gradle.kts` für Build-Skripte, die Settings-Datei (`settings.gradle.kts`) und Initialisierungsskripte (`init.gradle.kts`) verwendet.
|
||||
|
||||
### Type-safe Model Accessors
|
||||
The Kotlin DSL replaces Groovy's dynamic resolution with type-safe model accessors for elements contributed by plugins (configurations, tasks, extensions). This provides better IDE support (code completion, refactoring).
|
||||
### Typsichere Model-Accessors
|
||||
Die Kotlin DSL ersetzt Groovys dynamische Auflösung durch typsichere Model-Accessors für Elemente, die von Plugins bereitgestellt werden (Konfigurationen, Tasks, Erweiterungen). Dies sorgt für bessere IDE-Unterstützung (Code-Vervollständigung, Refactoring).
|
||||
|
||||
**Example:**
|
||||
**Beispiel:**
|
||||
```kotlin
|
||||
plugins {
|
||||
`java-library`
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 'api', 'implementation' are type-safe accessors
|
||||
// 'api', 'implementation' sind typsichere Accessors
|
||||
api("junit:junit:4.13")
|
||||
implementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
}
|
||||
|
||||
tasks {
|
||||
// 'test' is a type-safe accessor for the Test task
|
||||
// 'test' ist ein typsicherer Accessor für den Test-Task
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Accessors are available for elements contributed by plugins applied in the `plugins {}` block. For elements created dynamically later in the script, you must fall back to string-based lookups:
|
||||
Accessors stehen für Elemente zur Verfügung, die von Plugins im `plugins {}`-Block bereitgestellt werden. Für dynamisch im Skript erstellte Elemente muss auf zeichenkettenbasierte Lookups zurückgegriffen werden:
|
||||
```kotlin
|
||||
configurations.create("custom")
|
||||
|
||||
@@ -55,20 +55,20 @@ dependencies {
|
||||
```
|
||||
|
||||
### Lazy Property Assignment
|
||||
The Kotlin DSL supports lazy property assignment using the `=` operator for types like `Property` and `ConfigurableFileCollection`. This is the preferred way over the `set()` method.
|
||||
Die Kotlin DSL unterstützt die verzögerte Zuweisung von Properties mit dem `=`-Operator für Typen wie `Property` und `ConfigurableFileCollection`. Dies ist der bevorzugte Weg gegenüber der `set()`-Methode.
|
||||
|
||||
```kotlin
|
||||
// Instead of:
|
||||
// Anstatt:
|
||||
// javaVersion.set(JavaLanguageVersion.of(17))
|
||||
|
||||
// Use:
|
||||
// Verwende:
|
||||
javaVersion = JavaLanguageVersion.of(17)
|
||||
```
|
||||
|
||||
### Working with Containers
|
||||
You can interact with containers like `tasks` or `configurations` in several ways:
|
||||
### Arbeiten mit Containern
|
||||
Mit Containern wie `tasks` oder `configurations` kann auf verschiedene Weisen interagiert werden:
|
||||
|
||||
1. **Container API (using `named` and `register`):**
|
||||
1. **Container API (mit `named` und `register`):**
|
||||
```kotlin
|
||||
tasks.named<Test>("test") {
|
||||
testLogging.showExceptions = true
|
||||
@@ -79,7 +79,7 @@ You can interact with containers like `tasks` or `configurations` in several way
|
||||
}
|
||||
```
|
||||
|
||||
2. **Delegated Properties (using `by existing` and `by registering`):**
|
||||
2. **Delegierte Properties (mit `by existing` und `by registering`):**
|
||||
```kotlin
|
||||
val test by tasks.existing(Test::class) {
|
||||
testLogging.showStackTraces = true
|
||||
@@ -91,17 +91,17 @@ You can interact with containers like `tasks` or `configurations` in several way
|
||||
```
|
||||
|
||||
### Extra Properties
|
||||
Access project or task-level extra properties via delegated properties:
|
||||
Auf extra Properties auf Projekt- oder Task-Ebene wird über delegierte Properties zugegriffen:
|
||||
```kotlin
|
||||
// Define an extra property
|
||||
val myNewProperty by extra("initial value")
|
||||
// Eine extra Property definieren
|
||||
val myNewProperty by extra("Initialwert")
|
||||
|
||||
// Read an existing extra property
|
||||
// Eine bestehende extra Property lesen
|
||||
val myExtraProperty: String by extra
|
||||
```
|
||||
|
||||
### Kotlin DSL Plugin (`kotlin-dsl`)
|
||||
This plugin is essential for developing build logic in Kotlin (e.g., in `buildSrc` or for convention plugins). It automatically applies the Kotlin plugin and adds necessary dependencies like `kotlin-stdlib` and `gradleKotlinDsl()`.
|
||||
Dieses Plugin ist essenziell für die Entwicklung von Build-Logik in Kotlin (z.B. in `buildSrc` oder für Convention Plugins). Es wendet automatisch das Kotlin-Plugin an und fügt notwendige Abhängigkeiten wie `kotlin-stdlib` und `gradleKotlinDsl()` hinzu.
|
||||
|
||||
```kotlin
|
||||
// buildSrc/build.gradle.kts
|
||||
|
||||
@@ -5,69 +5,69 @@ owner: Lead Architect
|
||||
tags: [kotlin, release-notes, tech-stack]
|
||||
---
|
||||
|
||||
# What's new in Kotlin 2.3.0
|
||||
# Was ist neu in Kotlin 2.3.0
|
||||
|
||||
**Quelle:** [Original Kotlin Documentation](https://kotlinlang.org/docs/whatsnew23.html)
|
||||
**Quelle:** [Offizielle Kotlin-Dokumentation](https://kotlinlang.org/docs/whatsnew23.html)
|
||||
**Datum des Dokuments:** 16. Dezember 2025
|
||||
**Kontext:** Dieses Dokument dient als Referenz für die im Projekt verwendete Kotlin-Version.
|
||||
|
||||
---
|
||||
|
||||
The Kotlin 2.3.0 release is out! Here are the main highlights:
|
||||
Kotlin 2.3.0 ist erschienen! Hier sind die wichtigsten Highlights:
|
||||
|
||||
* **Language:** More stable and default features, unused return value checker, explicit backing fields, and changes to context-sensitive resolution.
|
||||
* **Kotlin/JVM:** Support for Java 25.
|
||||
* **Kotlin/Native:** Improved interop through Swift export, faster build time for release tasks, C and Objective-C library import in Beta.
|
||||
* **Kotlin/Wasm:** Fully qualified names and new exception handling proposal enabled by default, as well as new compact storage for Latin-1 characters.
|
||||
* **Kotlin/JS:** New experimental suspend function export, `LongArray` representation, unified companion object access, and more.
|
||||
* **Gradle:** Compatibility with Gradle 9.0 and a new API for registering generated sources.
|
||||
* **Compose compiler:** Stack traces for minified Android applications.
|
||||
* **Standard library:** Stable time tracking functionality and improved UUID generation and parsing.
|
||||
* **Sprache:** Mehr stabile und standardmäßig aktivierte Features, Checker für ungenutzte Rückgabewerte, explizite Backing Fields und Änderungen bei der kontextsensitiven Auflösung.
|
||||
* **Kotlin/JVM:** Unterstützung für Java 25.
|
||||
* **Kotlin/Native:** Verbesserte Interoperabilität durch Swift-Export, schnellere Build-Zeiten für Release-Tasks, C- und Objective-C-Bibliotheksimport in Beta.
|
||||
* **Kotlin/Wasm:** Vollständig qualifizierte Namen und neuer Ausnahmebehandlungsvorschlag standardmäßig aktiviert, sowie kompakter Speicher für Latin-1-Zeichen.
|
||||
* **Kotlin/JS:** Neuer experimenteller Export von Suspend-Funktionen, `LongArray`-Darstellung, einheitlicher Companion-Object-Zugriff und mehr.
|
||||
* **Gradle:** Kompatibilität mit Gradle 9.0 und neue API zur Registrierung generierter Quellen.
|
||||
* **Compose Compiler:** Stack Traces für minimierte Android-Anwendungen.
|
||||
* **Standardbibliothek:** Stabile Zeiterfassungsfunktionalität sowie verbesserte UUID-Generierung und -Analyse.
|
||||
|
||||
## Language
|
||||
## Sprache
|
||||
|
||||
Kotlin 2.3.0 focuses on feature stabilization, introduces a new mechanism for detecting unused return values, and improves context-sensitive resolution.
|
||||
Kotlin 2.3.0 konzentriert sich auf die Stabilisierung von Features, führt einen neuen Mechanismus zur Erkennung ungenutzter Rückgabewerte ein und verbessert die kontextsensitive Auflösung.
|
||||
|
||||
### Stable features
|
||||
### Stabile Features
|
||||
|
||||
The following features have now graduated to Stable:
|
||||
* Support for nested type aliases
|
||||
* Data-flow-based exhaustiveness checks for `when` expressions
|
||||
Folgende Features sind nun stabil:
|
||||
* Unterstützung für verschachtelte Typ-Aliase
|
||||
* Datenflussbasierte Vollständigkeitsprüfungen für `when`-Ausdrücke
|
||||
|
||||
### Features enabled by default
|
||||
* Support for `return` statements in expression bodies with explicit return types is now enabled by default.
|
||||
### Standardmäßig aktivierte Features
|
||||
* Unterstützung für `return`-Anweisungen in Ausdrucks-Bodies mit explizitem Rückgabetyp ist nun standardmäßig aktiviert.
|
||||
|
||||
### Experimental: Unused return value checker
|
||||
Kotlin 2.3.0 introduces the unused return value checker to help prevent ignored results.
|
||||
### Experimentell: Checker für ungenutzte Rückgabewerte
|
||||
Kotlin 2.3.0 führt den Checker für ungenutzte Rückgabewerte ein, um das versehentliche Ignorieren von Ergebnissen zu verhindern.
|
||||
|
||||
### Experimental: Explicit backing fields
|
||||
A new syntax for explicitly declaring the underlying field that holds a property's value, simplifying the common backing properties pattern.
|
||||
### Experimentell: Explizite Backing Fields
|
||||
Eine neue Syntax zur expliziten Deklaration des zugrundeliegenden Felds, das den Wert einer Property hält – vereinfacht das verbreitete Backing-Properties-Muster.
|
||||
|
||||
## Kotlin/JVM: Support for Java 25
|
||||
Starting with Kotlin 2.3.0, the compiler can generate classes containing Java 25 bytecode.
|
||||
## Kotlin/JVM: Unterstützung für Java 25
|
||||
Ab Kotlin 2.3.0 kann der Compiler Klassen mit Java-25-Bytecode generieren.
|
||||
|
||||
## Kotlin/Native
|
||||
* **Improved Swift Export:** Direct mapping for native enum classes and variadic function parameters.
|
||||
* **C and Objective-C Library Import is in Beta:** Better diagnostics for binary compatibility issues.
|
||||
* **Faster Build Time:** Up to 40% faster release builds, especially for iOS targets.
|
||||
* **Verbesserter Swift-Export:** Direkte Zuordnung für native Enum-Klassen und variadische Funktionsparameter.
|
||||
* **C- und Objective-C-Bibliotheksimport in Beta:** Bessere Diagnosen bei binären Kompatibilitätsproblemen.
|
||||
* **Schnellere Build-Zeit:** Bis zu 40 % schnellere Release-Builds, besonders für iOS-Targets.
|
||||
|
||||
## Kotlin/Wasm
|
||||
* **Fully Qualified Names Enabled by Default:** `KClass.qualifiedName` is now available at runtime without extra configuration.
|
||||
* **Compact Storage for Latin-1 Characters:** Reduces metadata and binary size.
|
||||
* **New Exception Handling for `wasmWasi`:** Enabled by default for better compatibility with modern WebAssembly runtimes.
|
||||
* **Vollständig qualifizierte Namen standardmäßig aktiviert:** `KClass.qualifiedName` ist nun ohne zusätzliche Konfiguration zur Laufzeit verfügbar.
|
||||
* **Kompakter Speicher für Latin-1-Zeichen:** Reduziert Metadaten- und Binärgröße.
|
||||
* **Neue Ausnahmebehandlung für `wasmWasi`:** Standardmäßig aktiviert für bessere Kompatibilität mit modernen WebAssembly-Laufzeitumgebungen.
|
||||
|
||||
## Kotlin/JS
|
||||
* **Experimental Suspend Function Export:** Export suspend functions directly to JavaScript using `@JsExport`.
|
||||
* **`BigInt64Array` for `LongArray`:** Simplifies interop with JavaScript APIs that use typed arrays.
|
||||
* **Unified Companion Object Access:** Consistent access to companion objects in interfaces across all JS module systems.
|
||||
* **Experimenteller Export von Suspend-Funktionen:** Suspend-Funktionen direkt nach JavaScript exportieren mittels `@JsExport`.
|
||||
* **`BigInt64Array` für `LongArray`:** Vereinfacht die Interoperabilität mit JavaScript-APIs, die typisierte Arrays verwenden.
|
||||
* **Einheitlicher Companion-Object-Zugriff:** Konsistenter Zugriff auf Companion Objects in Interfaces über alle JS-Modulsysteme hinweg.
|
||||
|
||||
## Gradle
|
||||
* Fully compatible with Gradle 7.6.3 through 9.0.0.
|
||||
* New experimental API for registering generated sources.
|
||||
* Vollständig kompatibel mit Gradle 7.6.3 bis 9.0.0.
|
||||
* Neue experimentelle API zur Registrierung generierter Quellen.
|
||||
|
||||
## Standard library
|
||||
* **Stable Time Tracking:** `kotlin.time.Clock` and `kotlin.time.Instant` are now stable.
|
||||
* **Improved UUID Generation:** New functions like `Uuid.parseOrNull()`, `Uuid.generateV4()`, and `Uuid.generateV7()`.
|
||||
## Standardbibliothek
|
||||
* **Stabile Zeiterfassung:** `kotlin.time.Clock` und `kotlin.time.Instant` sind nun stabil.
|
||||
* **Verbesserte UUID-Generierung:** Neue Funktionen wie `Uuid.parseOrNull()`, `Uuid.generateV4()` und `Uuid.generateV7()`.
|
||||
|
||||
## Compose compiler
|
||||
* **Stack Traces for Minified Android Apps:** The compiler now outputs ProGuard mappings for Compose stack traces when applications are minified by R8.
|
||||
## Compose Compiler
|
||||
* **Stack Traces für minimierte Android-Apps:** Der Compiler gibt nun ProGuard-Mappings für Compose-Stack-Traces aus, wenn Anwendungen durch R8 minimiert werden.
|
||||
|
||||
Reference in New Issue
Block a user