#Android
android.useAndroidX=true
android.nonTransitiveRClass=true

# Kotlin Configuration
kotlin.code.style=official
kotlin.daemon.jvmargs=-Xmx3072M -XX:+UseParallelGC -XX:MaxMetaspaceSize=1024M

# Kotlin Compiler Optimizations (Phase 5)
kotlin.incremental=true
kotlin.incremental.multiplatform=true
kotlin.incremental.js=true
kotlin.caching.enabled=true
kotlin.compiler.execution.strategy=in-process
kotlin.compiler.preciseCompilationResultsBackup=true
kotlin.stdlib.default.dependency=true

# Gradle Configuration
org.gradle.jvmargs=-Xmx3072M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" -XX:+UseParallelGC -XX:MaxMetaspaceSize=1024M -XX:+HeapDumpOnOutOfMemoryError -Xshare:off -Djava.awt.headless=true
org.gradle.workers.max=8
org.gradle.vfs.watch=true

# Configuration Cache optimieren - TEMPORÄR DEAKTIVIERT wegen JS-Test Serialisierungsproblemen
org.gradle.configuration-cache=false
org.gradle.configuration-cache.problems=warn

# Build Performance verbessern
org.gradle.parallel=true
org.gradle.caching=true

# Security and Reproducibility
org.gradle.dependency.verification=lenient
org.gradle.dependency.locking.enabled=true

# Development
io.ktor.development=true

# IDE Configuration
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true
org.jetbrains.kotlin.wasm.check.wasm.binary.format=false
kotlin.native.ignoreDisabledTargets=true
idea.project.settings.delegate.build.run.actions.to.gradle=true

# Enable NPM/Yarn lifecycle scripts for Kotlin/JS (required for sql.js & worker setup)
kotlin.js.yarn.ignoreScripts=false
org.jetbrains.kotlin.js.yarn.ignoreScripts=false
kotlin.js.npm.ignoreScripts=false
org.jetbrains.kotlin.js.npm.ignoreScripts=false

# Build Reporting
org.gradle.logging.level=lifecycle
kotlin.build.report.single_file=false

# Compose Experimental Features
org.jetbrains.compose.experimental.jscanvas.enabled=true
org.jetbrains.compose.experimental.wasm.enabled=true

# Java Toolchain: ensure Gradle auto-downloads a full JDK when needed
org.gradle.java.installations.auto-download=true
org.gradle.java.installations.auto-detect=true

# Development Environment Support
dev.port.offset=0
# Set dev.port.offset=100 for second developer
# Set dev.port.offset=200 for the third developer
enableWasm=false


# Dokka Gradle plugin V2 mode (with helpers for V1 compatibility)
# See https://kotl.in/dokka-gradle-migration
# org.jetbrains.dokka.experimental.gradle.pluginMode=V2EnabledWithHelpers
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
