Skip to main content

Publishing

1. Why​

v0.1 goes to Maven Central so any Android or KMP project can add Camouflage with one dependency. Once a version is published it can't be deleted, only superseded, so this note fixes the coordinates, versioning, signing and CI flow before the first release.

2. Shape​

Artifacts

CoordinatesContents
com.srctool.camouflage:camouflage-core:<v>core, with KMP variants for android, iosArm64, iosSimulatorArm64, jvm, wasmJs
com.srctool.camouflage:camouflage-skin-minimal:<v>the Minimal skin (v1) + minimalTheme
com.srctool.camouflage:camouflage-navigation3:<v>optional Navigation 3 integration (scene strategies, results)
(cross-platform rule)the core set's minor version matches Flutter's (0.3 = the same milestone); patches are independent
com.srctool.camouflage:camouflage-bom:<v>a BOM pinning core, skins and navigation3 to the same version, and family packages (later) to versions tested with it (ADR-27)

The consumer side:

commonMain.dependencies {
implementation(project.dependencies.platform("com.srctool.camouflage:camouflage-bom:0.1.0"))
implementation("com.srctool.camouflage:camouflage-core")
implementation("com.srctool.camouflage:camouflage-skin-minimal")
}

3. API​

3.1 The com.srctool.publish convention plugin​

plugins { id("com.vanniktech.maven.publish"); id("org.jetbrains.dokka") }

mavenPublishing {
publishToMavenCentral() // Central Portal (OSSRH was shut down in 2025)
signAllPublications()
coordinates("com.srctool.camouflage", project.name, version.toString())
pom {
name.set(project.name); description.set("Camouflage adaptive UI library")
url.set("https://github.com/srctool/camouflage")
licenses { license { name.set("Apache-2.0"); url.set("https://www.apache.org/licenses/LICENSE-2.0") } }
scm { url.set("https://github.com/srctool/camouflage-kotlin") }
developers { developer { id.set("srctool"); email.set("contact@srctool.com") } }
}
}

3.2 Secrets (GitHub Actions)​

ORG_GRADLE_PROJECT_mavenCentralUsername / …Password (a Central Portal user token), ORG_GRADLE_PROJECT_signingInMemoryKey (an ASCII-armored PGP private key), and …KeyPassword. The com.srctool namespace must be verified on the Central Portal first (a DNS TXT record on srctool.com).

3.3 Versioning​

  • SemVer. 0.x while the API settles: a minor bump may break, and the changelog says so.
  • From 1.0, breaking changes need a major bump, and checkKotlinAbi enforces awareness: an ABI change fails CI until updateKotlinAbi is committed and reviewed.
  • Deprecate before removing: @Deprecated(level = WARNING) for one minor version, then ERROR, then removal in the next major (the policy in Decisions).

4. Build steps​

  1. Claim the com.srctool namespace on the Central Portal (DNS verification).
  2. Generate a PGP key, publish the public key to a keyserver, and store the secrets.
  3. Write the com.srctool.publish convention plugin and apply it to core, skin-minimal and bom.
  4. ./gradlew publishToMavenLocal, then consume it from a throwaway Android-only project and a KMP project.
  5. The release workflow: on v* tags, a single macOS job runs check then publishToMavenCentral (a macOS host is needed for the iOS artifacts, and one host avoids duplicate uploads).
  6. Dokka HTML published to GitHub Pages, or linked from the Docusaurus site.
  7. Release 0.1.0.

Done when

  • com.srctool.camouflage:camouflage-core:0.1.0 resolves from Maven Central in a fresh Android app and a fresh KMP app (all four targets).

5. Edge cases​

CaseDecided behavior
A publish from Linux CIRefused by the workflow design: iOS artifacts need Xcode. Always publish from macOS.
A partial upload failureThe Central Portal deployment stays unreleased. Drop it in the portal, then re-run. Never bump the version to "fix" a failed upload.
A mistake in a released versionIt can't be deleted. Release a patch (0.1.1), and mark it in the changelog.
A snapshot channelOptional: publish -SNAPSHOT from main to the Central Portal snapshots repo, so the storybook project can track unreleased changes.
Decided (2026-10-02, ADR-36)
  • Group id: com.srctool.camouflage. The author owns srctool.com, and its DNS verification on the Central Portal is in progress. If verification fails, the fallback is io.github.srctool.camouflage (verified by a temporary public repo in the srctool GitHub org). Only srctool { publishing { groupId } } changes.
M15 start (2026-11-05): where publishing stands, and the plan

Already built (M0): the com.srctool.publish convention plugin (vanniktech, signing, POM), publish.yml (a vX.Y.Z tag on main, one macOS job: check, then publishAndReleaseToMavenCentral, then a GitHub Release), the BOM that pins every camouflage-* module, and version=0.1.0-SNAPSHOT overridden by the tag. Published set for 0.1.0: camouflage-core, the five skins (minimal, fluent, material, cupertino, carbon), camouflage-charts, camouflage-navigation3, camouflage-skin-testing (test helper: decide whether it ships) and camouflage-bom. The coordinates table above lists only core, minimal, navigation3 and the BOM; it predates ADR-40. Left for M15 (needs the owner's accounts, so I cannot do these): verify the com.srctool namespace on the Central Portal (DNS TXT on srctool.com), create the PGP key and publish its public half, add MAVEN_CENTRAL_USERNAME, MAVEN_CENTRAL_PASSWORD and the signing secrets to the maven-central environment, and push the tag. Left that I can do: publishToMavenLocal and a consumption test from a fresh Android app and a fresh KMP app (all four targets), Dokka HTML to GitHub Pages, per-module README and the CHANGELOG for 0.1.0, the library's description and POM fields, and a dry run of the release workflow without the publish step. Open for review: the group id (com.srctool.camouflage, the fallback io.github.srctool.camouflage if the DNS verification fails), whether camouflage-skin-testing is published, and the 0.1.0 tag date. Publishing is irreversible, so the tag waits for an explicit go.

M15 publishing prep, checked locally (2026-11-06)

Nothing was published. publishToMavenLocal -Pversion=0.1.0-localcheck ran for the whole set (core, charts, navigation3, the five skins, skin-testing and the BOM, with the iOS and wasm artifacts). A fresh KMP project (jvm, wasmJs, iosSimulatorArm64, android) and a fresh Android-only app both resolved the BOM and the modules from Maven Local and compiled. dokkaGenerate passes for every module, and the release workflow now attaches the API reference as camouflage-kotlin-api-<version>.zip (no Pages setup). Still the owner's: the Central Portal namespace and its DNS record, the PGP key and the four secrets in the maven-central environment, and the go for the v0.1.0 tag.

Released: v0.1.0 (2026-11-06)

Published to Maven Central from the tag v0.1.0 (commit 9a3fc30): com.srctool.camouflage:*:0.1.0, 15 artifacts, signed, with the API reference zip on the GitHub Release. How the workflow ended up: a vX.Y.Z tag on main pauses for the maven-central environment's reviewer; it then requires the two CI jobs (JVM/Android and iOS) to have passed on exactly the tagged commit (instead of rerunning check, which also failed once on the macOS runner's reduced-motion setting), builds the Dokka API reference, publishes and releases on the Central Portal, and creates the GitHub Release. Lessons: keep the Dokka step before the upload; a failed run before the upload leaves nothing to clean, so the tag can be moved; the Portal token lasts six months, so renew it before the next release.