Adding a module¶
Checklist for a new KMP artifact in this monorepo.
Library adapters that belong to an existing family should nest under that project
(e.g. :coroutines:compose, :coroutines:viewmodel) while keeping hyphenated Maven artifact ids
via canonicalArtifactId in CriolloPublishingCommon.
For a published Gradle plugin (see :project-conventions), use org.jetbrains.kotlin.jvm +
java-gradle-plugin + criollo.maven-publish instead of criollo.kmp-library, and wire
publishToMavenLocal / tests in RootPlugin.
For a JVM-only library (see :testing), use org.jetbrains.kotlin.jvm + java-library +
convention.junit5 + criollo.maven-publish, create a mavenJava publication from
components["java"], and wire BOM / expected-release-artifacts.txt / RootPlugin aggregators.
- Create the project directory (e.g.
logging/) withbuild.gradle.ktsapplying: criollo.kmp-library(applies Kotlin Multiplatform + Android KMP library + quality/publish conventions)-
Extra plugins only if needed (Compose, serialization, …) — apply
criollo.kmp-libraryfirst -
Register in
settings.gradle.kts:
include(":logging")
- Extend
ProjectConfig: Artifacts.*constantNamespaces.*Android namespace- POM description branch in
CriolloPublishingCommon.kt -
Add an
api(project(":…"))constraint inbom/build.gradle.kts -
Teach
CriolloKmpLibraryConventionPluginthe new:path→ namespace mapping. -
Wire verification in
RootPlugin(jvmLibraryTestsdependsOn). -
JS/Wasm: if the module uses browser targets, consider copying
webpack.config.d/resolve-fallback.js— see js-wasm.md. -
Document the artifact in the root README and bump
CHANGELOG.md. -
Consumers: add Maven coordinates to their version catalog; keep
includeBuilddependencySubstitution entries in sync for local dogfood. -
Quality: run
./gradlew qualityCheck jvmLibraryTests(installs git hooks viainstallGitHooks). See contributing.md.