Skip to content

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.

  1. Create the project directory (e.g. logging/) with build.gradle.kts applying:
  2. criollo.kmp-library (applies Kotlin Multiplatform + Android KMP library + quality/publish conventions)
  3. Extra plugins only if needed (Compose, serialization, …) — apply criollo.kmp-library first

  4. Register in settings.gradle.kts:

include(":logging")
  1. Extend ProjectConfig:
  2. Artifacts.* constant
  3. Namespaces.* Android namespace
  4. POM description branch in CriolloPublishingCommon.kt
  5. Add an api(project(":…")) constraint in bom/build.gradle.kts

  6. Teach CriolloKmpLibraryConventionPlugin the new :path → namespace mapping.

  7. Wire verification in RootPlugin (jvmLibraryTests dependsOn).

  8. JS/Wasm: if the module uses browser targets, consider copying webpack.config.d/resolve-fallback.js — see js-wasm.md.

  9. Document the artifact in the root README and bump CHANGELOG.md.

  10. Consumers: add Maven coordinates to their version catalog; keep includeBuild dependencySubstitution entries in sync for local dogfood.

  11. Quality: run ./gradlew qualityCheck jvmLibraryTests (installs git hooks via installGitHooks). See contributing.md.