Convenience Gradle plugin for reliable configuration of Kotlin & KMP projects.
- Completely lazy on-demand project configuration framework with many nice-to-have things out-of-the-box.
- Automatically configures hierarchical source sets, proveds convenience DSL for them.
- You can control, which targets are enabled by passing properties at build time. With no errors in modules with all targets disabled!
- Ready for Android, JS, KMP, KMM, JVM or IDEA plugin modules.
- Allows configuring verification tasks (Detekt, Lint, BinaryCompatibilityValidator with JS support!).
- Provides merged Sarif reports for the whole project.
- Provides baseline configuration tasks.
- Convenience console tests report at the end of the build along with merged XML report for the whole project.
- Allows using ProGuard and/or R8 as an optimizer for JVM targets.
- Enables passing of build targets via command line to control what gets configured (great for CI).
Initially made for the Fluxo state management framework and other libraries, then published for general use.
Targeted for Gradle 8+ and Kotlin 1.9+. Built with:
// in the `build.gradle.kts` of the target module
plugins {
kotlin("multiplatform") version "2.0.20"
id("io.github.fluxo-kt.fluxo-kmp-conf") version "0.12.1" // <-- add here
}
How to use snapshots from JitPack repository
// in the `build.gradle.kts` of the target module
plugins {
kotlin("multiplatform") version "2.0.20"
id("io.github.fluxo-kt.fluxo-kmp-conf") // <-- add here, no version needed for jitpack usage
}
// in the `settings.gradle.kts` of the project
pluginManagement {
repositories {
gradlePluginPortal()
maven("https://jitpack.io") // <-- add jitpack repo
}
resolutionStrategy.eachPlugin {
if (requested.id.toString() == "io.github.fluxo-kt.fluxo-kmp-conf")
useModule("com.github.fluxo-kt.fluxo-kmp-conf:fluxo-kmp-conf:08d53ad") // <-- specify version or commit
}
}
- Kotlin docs: Hierarchical project structure
- Kotlin/Native target support
- Distinguish several targets for one platform
Fluxo-KMP-Conf
automatically configures KMP projects with a hierarchical source-set structure based on the module configuration.
common
|-- commonJvm
| |-- jvm
| '-- android
'-- nonJvm
|-- commonJs
| |-- js
| '-- commonWasm (unstable, may be not available)
| |-- wasmJs
| '-- wasmWasi (experimental)
'-- native
|-- nix (unix-like systems)
| |-- apple
| | |-- ios
| | | |-- iosArm64
| | | |-- iosX64
| | | '-- iosSimulatorArm64
| | |-- macos
| | | |-- macosArm64
| | | '-- macosX64
| | |-- tvos
| | | |-- tvosArm64
| | | |-- tvosX64
| | | '-- tvosSimulatorArm64
| | '-- watchos
| | |-- watchosArm32
| | |-- watchosArm64
| | |-- watchosDeviceArm64 (tier 3)
| | |-- watchosX64
| | '-- watchosSimulatorArm64
| |-- linux
| | |-- linuxArm32Hfp (deprecated)
| | |-- linuxArm64
| | '-- linuxX64
| '-- androidNative (tier 3, can has limited set of POSIX APIs)
| |-- androidNativeArm32
| |-- androidNativeArm64
| |-- androidNativeX64
| '-- androidNativeX86
'-- mingw (Windows with limited set of POSIX APIs)
'-- mingwX64
- REQUIRES ENABLED GIT SYMLINKS for the project to work correctly during plugin development!
- Usually it's already enabled on Linux or macOS.
- On Windows, see this doc for more info.
- See CONTRIBUTING.md for more info on how to contribute.
- Gradle-Setup-Plugin by @arkivanov
- Gradle-Kmp-Configuration-Plugin and kotlin-components by @05nelsonm
- Slack-Gradle-Plugin (docs)
- Gradle-Spotless-Plugin from @diffplug
- AndroidX Baseline Profile Gradle Plugin
- Avito android infrastructure (docs)
Uses SemVer for versioning.
This project is licensed under the Apache License, Version 2.0 — see the license file for details.