Skip to content

6.x: Build logic housekeep - #188

Merged
matejsemancik merged 4 commits into
6.xfrom
feature/6.x-build-logic-housekeep
Apr 28, 2026
Merged

6.x: Build logic housekeep#188
matejsemancik merged 4 commits into
6.xfrom
feature/6.x-build-logic-housekeep

Conversation

@matejsemancik

@matejsemancik matejsemancik commented Apr 24, 2026

Copy link
Copy Markdown
Member

Summary

Tech-debt-only pass on the Gradle build logic ahead of the 6.x release. Centralizes the POM boilerplate shared across 9 published modules, unifies the JVM toolchain, and pulls vanniktech maven-publish up to 0.36.0 (required for AGP 9.1 compat).

flowchart LR
    subgraph buildSrc
        POM["ArkitektPom.kt<br/>MavenPom.arkitektPomBase()<br/>url, licenses, scm, developers"]
        SETTINGS["ProjectSettings.kt<br/>group, compileSdk, minSdk"]
    end

    subgraph "Published modules (9)"
        direction TB
        A["core · compose<br/>core-test · cr-usecases-test"]
        K["cr-usecases · decompose<br/>decompose-test<br/>decompose-annotation<br/>decompose-processor"]
    end

    subgraph "Per-module mavenPublishing { }"
        P1["publishToMavenCentral()"]
        P2["signAllPublications()"]
        P3["configureBasedOnAppliedPlugins()"]
        P4["coordinates(group, artifactId)"]
        P5["pom { name, description,<br/>inceptionYear, arkitektPomBase() }"]
    end

    A --> P1 & P2 & P3 & P4 & P5
    K --> P1 & P2 & P3 & P4 & P5
    POM --> P5
    SETTINGS --> P4

    ROOT["build.gradle.kts (root)<br/>subprojects { plugins.withId('signing')<br/>→ useInMemoryPgpKeys }<br/>detekt { dynamic subprojects scan }"]
    ROOT -.-> A
    ROOT -.-> K
Loading

Changes

  • vanniktech maven-publish 0.34.0 → 0.36.0 — 0.34.0 referenced AndroidPluginVersion, removed in AGP 9.1, so the old version silently failed its AGP check. 0.36.0 is tested up to AGP 9.1.0-alpha05.
  • Centralized POM via MavenPom.arkitektPomBase() — extension function in buildSrc/src/main/kotlin/ArkitektPom.kt owns url / licenses / scm / developers. Each module sets only name, description, inceptionYear.
  • configureBasedOnAppliedPlugins() replaces the per-module configure(AndroidSingleVariantLibrary(publishJavadocJar = false)) and configure(KotlinMultiplatform(...)) calls (the Boolean-based variants are deprecated in 0.36.0). Also drops the redundant androidVariantsToPublish = listOf(\"debug\", \"release\") that was a no-op under com.android.kotlin.multiplatform.library.
  • Unified kotlin { jvmToolchain(17) } across the Android-library modules (core, compose, core-test, cr-usecases-test), example, and arkitekt-lint. Replaces the compileOptions VERSION_17 + kotlin { compilerOptions { jvmTarget.set(JVM_17) } } duplex.
  • Inception year 2026 for the Decompose family (decompose, decompose-test, decompose-annotation, decompose-processor); 2018 retained for legacy modules.
  • Dynamic detekt source list — root detekt { source.setFrom(...) } now walks subprojects instead of a hard-coded path list that silently skipped decompose-test.
  • Removed per-module gradle.properties (core, core-test, cr-usecases, cr-usecases-test) and POM_* / SONATYPE_HOST / mavenCentralPublishing / signAllPublications keys from the root gradle.properties — values now live in the Gradle DSL.
  • Pruned ProjectSettings.Publish, Core, CoreTest, CrUseCases, CrUseCasesTest, Dagger objects from buildSrc — dead code.
  • Signing wiring (plugins.withId(\"signing\") { useInMemoryPgpKeys(...) }) kept in root subprojects { } (moving it into a convention plugin would require AGP on buildSrc's classpath, which conflicts with Kotlin 2.3.x on KMP iosArm64 compile — deferred).

Test plan

  • ./gradlew help and ./gradlew assemble — succeed
  • ./gradlew detekt ktlintCheck — succeed; detekt now scans decompose-test sources (previously skipped)
  • publishToMavenLocal for all 9 modules — verified POMs in ~/.m2/repository/app/futured/arkitekt/* contain correct name, description, url, licenses, scm, developers
  • inceptionYear is 2018 for core and cr-usecases, 2026 for decompose and decompose-test
  • :decompose:publishToMavenLocal produces a single Android artifact (no -debug/-release pair), confirming the androidVariantsToPublish removal is a true no-op
  • CI release workflow (publish_release.yml) run against a pre-release tag to confirm signing + Maven Central Portal upload still work end-to-end

🤖 Generated with Claude Code

matejsemancik and others added 3 commits April 24, 2026 13:43
- Upgrade vanniktech maven-publish 0.34.0 → 0.36.0 (AGP 9.1 compat)
- Centralize shared POM via MavenPom.arkitektPomBase() in buildSrc
- Replace deprecated configure(AndroidSingleVariantLibrary / Kotlin
  Multiplatform) with configureBasedOnAppliedPlugins() and drop the
  redundant androidVariantsToPublish list
- Unify jvmToolchain(17) across Android-library modules, example,
  and arkitekt-lint
- Set inceptionYear 2026 for the Decompose family modules
- Replace stale detekt source list with dynamic subprojects scan
- Delete per-module gradle.properties and POM_* keys from the root;
  prune unused ProjectSettings nested objects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@matejsemancik matejsemancik changed the title 6.x Build logic housekeep 6.x: Build logic housekeep Apr 24, 2026
@matejsemancik
matejsemancik requested review from RudolfHladik, Syntey, Copilot and okalman and removed request for Copilot and okalman April 24, 2026 12:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Tech-debt cleanup of the Gradle build logic ahead of the 6.x release, focusing on reducing per-module publishing boilerplate, aligning build toolchains, and updating publishing tooling for newer AGP compatibility.

Changes:

  • Centralized shared Maven POM metadata into a buildSrc MavenPom.arkitektPomBase() extension and simplified per-module mavenPublishing {} blocks.
  • Unified Kotlin JVM toolchain usage (jvmToolchain(17)) across modules and removed duplicated per-module JVM target/compile options wiring.
  • Updated build infra: bumped vanniktech maven-publish to 0.36.0, made detekt sources dynamic across subprojects, and simplified signing configuration.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
gradle.properties Removes legacy POM/publishing properties now configured via Gradle DSL.
build.gradle.kts Simplifies signing hook and makes detekt sources dynamic across subprojects.
buildSrc/build.gradle.kts Adds mavenCentral() to buildSrc repositories.
buildSrc/src/main/kotlin/Versions.kt Bumps vanniktech maven-publish version to 0.36.0.
buildSrc/src/main/kotlin/ProjectSettings.kt Removes dead publishing/artifact constants; keeps core settings only.
buildSrc/src/main/kotlin/ArkitektPom.kt Introduces shared POM metadata function for published modules.
example/build.gradle.kts Switches to Kotlin jvmToolchain(17) and removes per-module JVM target/compileOptions duplication.
core/build.gradle.kts Adopts centralized publishing config and jvmToolchain(17).
core/gradle.properties Removes per-module POM properties.
core-test/build.gradle.kts Adopts centralized publishing config and jvmToolchain(17).
core-test/gradle.properties Removes per-module POM properties.
compose/build.gradle.kts Adopts centralized publishing config and jvmToolchain(17).
cr-usecases/build.gradle.kts Adopts centralized publishing config and jvmToolchain(17).
cr-usecases/gradle.properties Removes per-module POM properties.
cr-usecases-test/build.gradle.kts Adopts centralized publishing config and jvmToolchain(17).
cr-usecases-test/gradle.properties Removes per-module POM properties.
decompose/build.gradle.kts Adopts centralized publishing config, jvmToolchain(17), and sets inception year to 2026.
decompose-test/build.gradle.kts Adopts centralized publishing config, jvmToolchain(17), and sets inception year to 2026.
decompose-annotation/build.gradle.kts Adopts centralized publishing config, jvmToolchain(17), and sets inception year to 2026.
decompose-processor/build.gradle.kts Adopts centralized publishing config, jvmToolchain(17), and sets inception year to 2026.
arkitekt-lint/build.gradle.kts Sets Kotlin JVM toolchain to 17 for lint module.
.github/workflows/publish_release.yml Removes plugin publishing step from release workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread buildSrc/src/main/kotlin/ArkitektPom.kt Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Base automatically changed from feature/6.x-decompose-test to 6.x April 28, 2026 10:59
@matejsemancik
matejsemancik merged commit 49dd873 into 6.x Apr 28, 2026
1 check passed
@matejsemancik
matejsemancik deleted the feature/6.x-build-logic-housekeep branch April 28, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants