diff --git a/.editorconfig b/.editorconfig index 70a83e4e38..2d6900d5fd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -189,7 +189,7 @@ ij_prototext_spaces_within_brackets = false [{*.properties,spring.handlers,spring.schemas}] ij_properties_align_group_field_declarations = false -ij_properties_keep_blank_lines = false +ij_properties_keep_blank_lines = true ij_properties_key_value_delimiter = equals ij_properties_spaces_around_key_value_delimiter = false diff --git a/build-logic/conventions/src/main/kotlin/modulecheck/builds/CheckPlugin.kt b/build-logic/conventions/src/main/kotlin/modulecheck/builds/CheckPlugin.kt index 0580b7d08d..81b67a11a0 100644 --- a/build-logic/conventions/src/main/kotlin/modulecheck/builds/CheckPlugin.kt +++ b/build-logic/conventions/src/main/kotlin/modulecheck/builds/CheckPlugin.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -36,7 +36,7 @@ abstract class CheckPlugin : Plugin { task.dependsOn(target.rootProject.tasks.matchingName("artifactsDump")) task.dependsOn(target.rootProject.tasks.matchingName("spotlessApply")) task.dependsOn(target.rootProject.tasks.matchingName("updateChangelogVersionLinks")) - task.dependsOn(target.tasks.matchingName("apiDump")) + // task.dependsOn(target.tasks.matchingName("apiDump")) task.dependsOn(target.tasks.matchingName("dependencyGuardBaseline")) task.dependsOn(target.tasks.matchingName("ktlintFormat")) task.dependsOn(target.tasks.matchingName("deleteEmptyDirs")) diff --git a/build-logic/conventions/src/main/kotlin/modulecheck/builds/KtLintConventionPlugin.kt b/build-logic/conventions/src/main/kotlin/modulecheck/builds/KtLintConventionPlugin.kt index ad5b25953d..9812cfc49a 100644 --- a/build-logic/conventions/src/main/kotlin/modulecheck/builds/KtLintConventionPlugin.kt +++ b/build-logic/conventions/src/main/kotlin/modulecheck/builds/KtLintConventionPlugin.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -40,7 +40,6 @@ abstract class KtLintConventionPlugin : Plugin { target.tasks.withType(KotlinApiCompareTask::class.java) ) sequenceOfNotNull( - target.tasks.namedOrNull("apiDump"), target.tasks.namedOrNull("dependencyGuard"), target.tasks.namedOrNull("dependencyGuardBaseline") ) diff --git a/build-logic/conventions/src/main/kotlin/modulecheck/builds/publishing.kt b/build-logic/conventions/src/main/kotlin/modulecheck/builds/publishing.kt index 9e8641bf8b..84157a6c38 100644 --- a/build-logic/conventions/src/main/kotlin/modulecheck/builds/publishing.kt +++ b/build-logic/conventions/src/main/kotlin/modulecheck/builds/publishing.kt @@ -22,7 +22,6 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka import com.vanniktech.maven.publish.KotlinJvm import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.SonatypeHost.Companion.DEFAULT -import kotlinx.validation.ApiValidationExtension import org.gradle.api.NamedDomainObjectProvider import org.gradle.api.Project import org.gradle.api.publish.PublishingExtension @@ -100,18 +99,18 @@ private fun Project.configurePublishPlugin( fun Project.applyBinaryCompatibility() { - pluginManager.apply("org.jetbrains.kotlinx.binary-compatibility-validator") - - extensions.configure(ApiValidationExtension::class.java) { extension -> - - // Packages that are excluded from public API dumps even if they contain public API - extension.ignoredPackages = mutableSetOf("sample", "samples") - - // Subprojects that are excluded from API validation - extension.ignoredProjects = mutableSetOf() - } - - tasks.named("apiCheck").mustRunAfter("apiDump") + // pluginManager.apply("org.jetbrains.kotlinx.binary-compatibility-validator") + // + // extensions.configure(ApiValidationExtension::class.java) { extension -> + // + // // Packages that are excluded from public API dumps even if they contain public API + // extension.ignoredPackages = mutableSetOf("sample", "samples") + // + // // Subprojects that are excluded from API validation + // extension.ignoredProjects = mutableSetOf() + // } + // + // tasks.named("apiCheck").mustRunAfter("apiDump") } private fun Project.configurePublish(artifactId: String, pomDescription: String, groupId: String) { diff --git a/build.gradle.kts b/build.gradle.kts index 5f3ee73f65..19640aae76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,29 +13,30 @@ * limitations under the License. */ -import com.rickbusarow.kgx.buildDir -import modulecheck.builds.GROUP -import modulecheck.builds.PLUGIN_ID -import modulecheck.builds.VERSION_NAME -import modulecheck.builds.VERSION_NAME_STABLE - buildscript { dependencies { classpath(libs.kotlin.gradle.plugin) - classpath(libs.vanniktech.publish) - classpath(libs.rickBusarow.kgx) } } plugins { - id("mcbuild.root") - alias(libs.plugins.dependencyAnalysis) - alias(libs.plugins.detekt) alias(libs.plugins.doks) - alias(libs.plugins.moduleCheck) + alias(libs.plugins.poko) apply false + alias(libs.plugins.mahout.root) + + // Avoid "the plugin is already in the classpath with an unknown version" issues + // when consuming Mahout from a snapshot build. + alias(libs.plugins.mahout.kotlin.jvm.module) apply false + alias(libs.plugins.mahout.java.gradle.plugin) apply false + alias(libs.plugins.taskTree) } +val GROUP = mahoutProperties.group.get() +val PLUGIN_ID = "com.rickbusarow.module-check" +val VERSION_NAME = mahoutProperties.versionName.get() +val VERSION_NAME_STABLE = libs.versions.rickBusarow.moduleCheck.get() + doks { dokSet("readme") { docs("README.md", "CHANGELOG.md") @@ -115,50 +116,17 @@ doks { } } -moduleCheck { - deleteUnused = true - checks { - depths = true - sortDependencies = true - } - reports { - depths.enabled = true - graphs { - enabled = true - outputDir = "${buildDir()}/reports/modulecheck/graphs" - } - } -} - -afterEvaluate { - - // Hack for ensuring that when 'publishToMavenLocal' is invoked from the root project, - // all subprojects are published. This is used in plugin tests. - sequenceOf( - "publishToMavenLocal", - "publishToMavenLocalNoDokka" - ).forEach { taskName -> - tasks.register(taskName) { - subprojects.forEach { sub -> - dependsOn(sub.tasks.matching { it.name == taskName }) - } - } - } - - sequenceOf( - "buildHealth", - "clean", - "ktlintCheck", - "ktlintFormat", - "ktlintCheckGradleScripts", - "ktlintFormatGradleScripts", - "moduleCheck", - "moduleCheckAuto", - "moduleCheckSortDependenciesAuto", - "test" - ).forEach { taskName -> - tasks.named(taskName).configure { - dependsOn(gradle.includedBuild("build-logic").task(":$taskName")) - } - } -} +// moduleCheck { +// deleteUnused = true +// checks { +// depths = true +// sortDependencies = true +// } +// reports { +// depths.enabled = true +// graphs { +// enabled = true +// outputDir = "${buildDir()}/reports/modulecheck/graphs" +// } +// } +// } diff --git a/gradle.properties b/gradle.properties index 6e8a73fe44..ff9566465b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ # -# Copyright (C) 2021-2023 Rick Busarow +# Copyright (C) 2021-2025 Rick Busarow # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -22,3 +22,33 @@ kotlin.code.style=official kotlin.caching.enabled=true kotlin.incremental=true kapt.include.compile.classpath=false + +com.squareup.anvil.trackSourceFiles=true +com.squareup.anvil.generateDaggerFactories=true + +group=com.rickbusarow.modulecheck +version=0.13.0-SNAPSHOT + +mahout.kotlin.apiLevel=1.9 +mahout.kotlin.allWarningsAsErrors=null +mahout.kotlin.explicitApi=null + +mahout.java.jvmTarget=11 +mahout.java.jvmSource=11 +mahout.java.jvmToolchain=17 +mahout.java.testJvmTargets=11,17,21 + +mahout.repository.defaultBranch=main +mahout.repository.github.owner=rickbusarow +mahout.repository.github.repo=modulecheck + +mahout.publishing.pom.inceptionYear=2023 +mahout.publishing.pom.url=https://github.com/rickbusarow/modulecheck + +mahout.publishing.pom.license.name=The Apache Software License, Version 2.0 +mahout.publishing.pom.license.url=https://www.apache.org/licenses/LICENSE-2.0.txt +mahout.publishing.pom.license.dist=repo + +mahout.publishing.pom.developer.id=rickbusarow +mahout.publishing.pom.developer.name=Rick Busarow +mahout.publishing.pom.developer.url=https://github.com/rickbusarow diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 00889dd5bb..62a50e8213 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,6 +9,7 @@ kotlin-gradle = "2.0.21" kotlin-core = "2.0.21" google-ksp = "2.0.21-1.0.27" square-anvil = "2.5.1" +poko = "0.18.7" ajalt-clikt = "5.0.3" ajalt-mordant = "3.0.2" @@ -72,6 +73,7 @@ rickBusarow-kase = "0.12.0" rickBusarow-kgx = "0.1.12" rickBusarow-ktlint = "0.2.2" rickBusarow-ktrules = "1.5.0" +rickBusarow-mahout = "0.1.0-SNAPSHOT" rickBusarow-moduleCheck = "0.12.5" rickBusarow-tangle = "0.15.1" semVer = "2.1.0" @@ -113,6 +115,13 @@ tangle = { id = "com.rickbusarow.tangle", version.ref = "rickBusarow-tangle" } taskTree = { id = "com.dorongold.task-tree", version.ref = "taskTree" } wire = { id = "com.squareup.wire", version.ref = "square-wire" } + +poko = { id = "dev.drewhamilton.poko", version.ref = "poko" } +mahout-root = { id = "com.rickbusarow.mahout.root", version.ref = "rickBusarow-mahout" } +mahout-kotlin-jvm-module = { id = "com.rickbusarow.mahout.kotlin-jvm-module", version.ref = "rickBusarow-mahout" } +mahout-java-gradle-plugin = { id = "com.rickbusarow.mahout.java-gradle-plugin", version.ref = "rickBusarow-mahout" } + + [libraries] agp = { module = "com.android.tools.build:gradle", version.ref = "androidTools" } agp-api = { module = "com.android.tools.build:gradle-api", version.ref = "androidTools" } diff --git a/modulecheck-api/build.gradle.kts b/modulecheck-api/build.gradle.kts index adf62d06f9..8cba1b5904 100644 --- a/modulecheck-api/build.gradle.kts +++ b/modulecheck-api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,15 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - - published( - artifactId = "modulecheck-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-api") + } } dependencies { diff --git a/modulecheck-config/api/build.gradle.kts b/modulecheck-config/api/build.gradle.kts index 9abec694a8..e3e9ae1c1c 100644 --- a/modulecheck-config/api/build.gradle.kts +++ b/modulecheck-config/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-config-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-config-api") + } } dependencies { diff --git a/modulecheck-config/fake/build.gradle.kts b/modulecheck-config/fake/build.gradle.kts index ef0f497557..5d20f36d62 100644 --- a/modulecheck-config/fake/build.gradle.kts +++ b/modulecheck-config/fake/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-config-fake" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-config-fake") + } } dependencies { diff --git a/modulecheck-config/impl/build.gradle.kts b/modulecheck-config/impl/build.gradle.kts index a493141a69..0cafacad4d 100644 --- a/modulecheck-config/impl/build.gradle.kts +++ b/modulecheck-config/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-config-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-config-impl") + } } dependencies { diff --git a/modulecheck-dagger/build.gradle.kts b/modulecheck-dagger/build.gradle.kts index 34b17abea8..7d200ed80c 100644 --- a/modulecheck-dagger/build.gradle.kts +++ b/modulecheck-dagger/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-dagger" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-dagger") + } } dependencies { diff --git a/modulecheck-finding/api/build.gradle.kts b/modulecheck-finding/api/build.gradle.kts index 12ce264401..e934d9be99 100644 --- a/modulecheck-finding/api/build.gradle.kts +++ b/modulecheck-finding/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-finding-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-finding-api") + } } dependencies { diff --git a/modulecheck-finding/impl-android/build.gradle.kts b/modulecheck-finding/impl-android/build.gradle.kts index dd70528296..bd738c9732 100644 --- a/modulecheck-finding/impl-android/build.gradle.kts +++ b/modulecheck-finding/impl-android/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-finding-impl-android" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-finding-impl-android") + } } dependencies { diff --git a/modulecheck-finding/impl-sort/build.gradle.kts b/modulecheck-finding/impl-sort/build.gradle.kts index f9bed0258d..5412a1a0d9 100644 --- a/modulecheck-finding/impl-sort/build.gradle.kts +++ b/modulecheck-finding/impl-sort/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-finding-impl-sort" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-finding-impl-sort") + } } dependencies { diff --git a/modulecheck-finding/impl/build.gradle.kts b/modulecheck-finding/impl/build.gradle.kts index 9491e0c92f..bf7b1f5191 100644 --- a/modulecheck-finding/impl/build.gradle.kts +++ b/modulecheck-finding/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-finding-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-finding-impl") + } } dependencies { diff --git a/modulecheck-finding/name/build.gradle.kts b/modulecheck-finding/name/build.gradle.kts index c3ab7d2395..20a3f216ed 100644 --- a/modulecheck-finding/name/build.gradle.kts +++ b/modulecheck-finding/name/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-finding-name" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-finding-name") + } } dependencies { diff --git a/modulecheck-gradle/platforms/api/build.gradle.kts b/modulecheck-gradle/platforms/api/build.gradle.kts index acb0c46991..03421bcaf0 100644 --- a/modulecheck-gradle/platforms/api/build.gradle.kts +++ b/modulecheck-gradle/platforms/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-gradle-platform-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-gradle-platform-api") + } } dependencies { diff --git a/modulecheck-gradle/platforms/impl/build.gradle.kts b/modulecheck-gradle/platforms/impl/build.gradle.kts index 54b0c67320..eb5a4a91eb 100644 --- a/modulecheck-gradle/platforms/impl/build.gradle.kts +++ b/modulecheck-gradle/platforms/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-gradle-platform-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-gradle-platform-impl") + } } dependencies { diff --git a/modulecheck-gradle/platforms/internal-android/build.gradle.kts b/modulecheck-gradle/platforms/internal-android/build.gradle.kts index 9c8be648e9..bcd7b7eee5 100644 --- a/modulecheck-gradle/platforms/internal-android/build.gradle.kts +++ b/modulecheck-gradle/platforms/internal-android/build.gradle.kts @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-gradle-platform-internal-android" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-gradle-platform-internal-android") + } } kotlin { diff --git a/modulecheck-gradle/platforms/internal-jvm/build.gradle.kts b/modulecheck-gradle/platforms/internal-jvm/build.gradle.kts index 03046a8bb2..f53ef14103 100644 --- a/modulecheck-gradle/platforms/internal-jvm/build.gradle.kts +++ b/modulecheck-gradle/platforms/internal-jvm/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-gradle-platform-internal-jvm" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-gradle-platform-internal-jvm") + } } dependencies { diff --git a/modulecheck-gradle/plugin/build.gradle.kts b/modulecheck-gradle/plugin/build.gradle.kts index b220b97c56..8a4958adba 100644 --- a/modulecheck-gradle/plugin/build.gradle.kts +++ b/modulecheck-gradle/plugin/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,82 +13,50 @@ * limitations under the License. */ -import com.rickbusarow.kgx.dependsOn -import modulecheck.builds.ShardTestTask -import modulecheck.builds.shards.registerYamlShardsTasks +import org.gradle.api.tasks.testing.logging.TestLogEvent +import kotlin.math.ceil plugins { - id("mcbuild") - id("com.gradle.plugin-publish") - id("java-gradle-plugin") + alias(libs.plugins.mahout.java.gradle.plugin) + alias(libs.plugins.gradle.plugin.publish) + alias(libs.plugins.buildconfig) + kotlin("kapt") idea } val pluginId = "com.rickbusarow.module-check" -@Suppress("UnstableApiUsage") val pluginDeclaration: NamedDomainObjectProvider = gradlePlugin.plugins - .register("generateProtos") { + .register("moduleCheck") { id = pluginId - group = modulecheck.builds.GROUP + group = mahoutProperties.group.get() displayName = "ModuleCheck" implementationClass = "modulecheck.gradle.ModuleCheckPlugin" - version = modulecheck.builds.VERSION_NAME description = "Fast dependency graph validation for gradle" tags.addAll("kotlin", "dependencies", "android", "gradle-plugin", "kotlin-compiler-plugin") } -mcbuild { - published( - artifactId = "modulecheck-gradle-plugin" - ) - publishedPlugin(pluginDeclaration) - dagger() - - buildConfig { - packageName.set("modulecheck.gradle.internal") - field("version") { modulecheck.builds.VERSION_NAME } - field("sourceWebsite") { modulecheck.builds.SOURCE_WEBSITE } - field("docsWebsite") { modulecheck.builds.DOCS_WEBSITE } - } - buildConfig("integrationTest") { - packageName.set("modulecheck.gradle.internal") - field("version") { modulecheck.builds.VERSION_NAME } - field("sourceWebsite") { modulecheck.builds.SOURCE_WEBSITE } - field("docsWebsite") { modulecheck.builds.DOCS_WEBSITE } - } -} - -val main by sourceSets.getting -val test by sourceSets.getting - -val integrationTest by java.sourceSets.registering { - kotlin.apply { - compileClasspath += main.output - .plus(test.output) - .plus(configurations.testRuntimeClasspath.get()) - runtimeClasspath += output + compileClasspath +mahout { + publishing { + pluginMaven( + artifactId = "modulecheck-gradle-plugin" + ) + publishPlugin(pluginDeclaration) } + gradleTests() } -// mark the integrationTest directory as a test directory in the IDE -idea { - module { - integrationTest.configure { - allSource.srcDirs - .forEach { srcDir -> - module.testSources.from(srcDir) - } - } +buildConfig { + val DOCS_WEBSITE = "https://rickbusarow.github.io/ModuleCheck" + sourceSets.named("main") { + packageName.set("modulecheck.gradle.internal") + buildConfigField("version", mahoutProperties.versionName) + buildConfigField("sourceWebsite", mahoutProperties.publishing.pom.url) + buildConfigField("docsWebsite", DOCS_WEBSITE) } } -val integrationTestCompile by configurations.registering { - extendsFrom(configurations["testCompileOnly"]) -} -val integrationTestRuntime by configurations.registering { - extendsFrom(configurations["testRuntimeOnly"]) -} +val gradleTestImplementation by configurations.getting dependencies { @@ -136,68 +104,121 @@ dependencies { implementation(project(path = ":modulecheck-utils:coroutines:impl")) implementation(project(path = ":modulecheck-utils:stdlib")) - "integrationTestImplementation"(project(path = ":modulecheck-config:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-gradle:platforms:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-gradle:platforms:internal-android")) - "integrationTestImplementation"(project(path = ":modulecheck-gradle:platforms:internal-jvm")) - "integrationTestImplementation"(project(path = ":modulecheck-internal-testing")) - "integrationTestImplementation"(project(path = ":modulecheck-model:dependency:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-model:sourceset:api")) - "integrationTestImplementation"(project(path = ":modulecheck-parsing:gradle:dsl:internal")) - "integrationTestImplementation"(project(path = ":modulecheck-parsing:gradle:model:impl-typesafe")) - "integrationTestImplementation"(project(path = ":modulecheck-parsing:kotlin-compiler:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-parsing:wiring")) - "integrationTestImplementation"(project(path = ":modulecheck-reporting:logging:api")) - "integrationTestImplementation"(project(path = ":modulecheck-rule:api")) - "integrationTestImplementation"(project(path = ":modulecheck-rule:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-rule:impl-factory")) - "integrationTestImplementation"(project(path = ":modulecheck-utils:coroutines:impl")) - "integrationTestImplementation"(project(path = ":modulecheck-utils:stdlib")) - - testImplementation(libs.bundles.junit) - testImplementation(libs.bundles.kotest) - - testImplementation(project(path = ":modulecheck-internal-testing")) - testImplementation(project(path = ":modulecheck-project-generation:api")) - testImplementation(project(path = ":modulecheck-utils:stdlib")) + gradleTestImplementation(libs.bundles.junit) + gradleTestImplementation(libs.bundles.kotest) + + gradleTestImplementation(project(path = ":modulecheck-config:api")) + gradleTestImplementation(project(path = ":modulecheck-config:impl")) + gradleTestImplementation(project(path = ":modulecheck-dagger")) + gradleTestImplementation(project(path = ":modulecheck-finding:name")) + gradleTestImplementation(project(path = ":modulecheck-gradle:platforms:api")) + gradleTestImplementation(project(path = ":modulecheck-gradle:platforms:impl")) + gradleTestImplementation(project(path = ":modulecheck-gradle:platforms:internal-android")) + gradleTestImplementation(project(path = ":modulecheck-gradle:platforms:internal-jvm")) + gradleTestImplementation(project(path = ":modulecheck-internal-testing")) + gradleTestImplementation(project(path = ":modulecheck-model:dependency:api")) + gradleTestImplementation(project(path = ":modulecheck-model:dependency:impl")) + gradleTestImplementation(project(path = ":modulecheck-model:sourceset:api")) + gradleTestImplementation(project(path = ":modulecheck-parsing:gradle:dsl:api")) + gradleTestImplementation(project(path = ":modulecheck-parsing:gradle:dsl:internal")) + gradleTestImplementation(project(path = ":modulecheck-parsing:gradle:model:api")) + gradleTestImplementation(project(path = ":modulecheck-parsing:gradle:model:impl-typesafe")) + gradleTestImplementation(project(path = ":modulecheck-parsing:kotlin-compiler:impl")) + gradleTestImplementation(project(path = ":modulecheck-parsing:source:api")) + gradleTestImplementation(project(path = ":modulecheck-parsing:wiring")) + gradleTestImplementation(project(path = ":modulecheck-project-generation:api")) + gradleTestImplementation(project(path = ":modulecheck-project:api")) + gradleTestImplementation(project(path = ":modulecheck-project:impl")) + gradleTestImplementation(project(path = ":modulecheck-reporting:logging:api")) + gradleTestImplementation(project(path = ":modulecheck-rule:api")) + gradleTestImplementation(project(path = ":modulecheck-rule:impl")) + gradleTestImplementation(project(path = ":modulecheck-rule:impl-factory")) + gradleTestImplementation(project(path = ":modulecheck-runtime:api")) + gradleTestImplementation(project(path = ":modulecheck-utils:coroutines:impl")) + gradleTestImplementation(project(path = ":modulecheck-utils:stdlib")) + + kapt(libs.google.dagger.compiler) } -val integrationTestTask = tasks.register("integrationTest", Test::class) { - val integrationTestSourceSet = java.sourceSets["integrationTest"] - testClassesDirs = integrationTestSourceSet.output.classesDirs - classpath = integrationTestSourceSet.runtimeClasspath - dependsOn(":publishToMavenLocalNoDokka") -} - -val shardCount = 6 -(1..shardCount).forEach { - - tasks.register("integrationTestShard$it", ShardTestTask::class) { - shardNumber.set(it) - totalShards.set(shardCount) - testClassesDirs = integrationTest.get().output.classesDirs - classpath = integrationTest.get().runtimeClasspath - doFirst { - setFilter() - } - dependsOn("integrationTestClasses", ":publishToMavenLocalNoDokka") +val gradleTestTask by tasks.named("gradleTest", Test::class) + +// val shardCount = 6 +// (1..shardCount).forEach { +// +// tasks.register("gradleTestShard$it", ShardTestTask::class) { +// shardNumber.set(it) +// totalShards.set(shardCount) +// testClassesDirs = gradleTest.get().output.classesDirs +// classpath = gradleTest.get().runtimeClasspath +// doFirst { +// setFilter() +// } +// dependsOn("gradleTestClasses", ":publishToMavenLocalNoDokka") +// } +// } + +// registerYamlShardsTasks( +// shardCount = shardCount, +// startTagName = "### ", +// endTagName = "### ", +// taskNamePart = "gradleTest", +// yamlFile = rootProject.file(".github/workflows/ci.yml") +// ) + +abstract class ShardTestTask : Test() { + + @get:Input + abstract val totalShards: Property + + @get:Input + abstract val shardNumber: Property + + private var filterWasSet: Boolean = false + + fun setFilter() { + + // Calculate the range of test classes for this shard + val testClassCount = testClassesDirs.asFileTree.matching { + include("**/*Test.class") + }.files.size + + val testsPerShard = ceil(testClassCount.toDouble() / totalShards.get()).toInt() + val startIndex = testsPerShard * (shardNumber.get() - 1) + val endIndex = minOf(testClassCount, startIndex + testsPerShard) + + testLogging.events( + TestLogEvent.FAILED, + TestLogEvent.STARTED, + TestLogEvent.PASSED, + TestLogEvent.SKIPPED + ) + + testClassesDirs.asFileTree.matching { + include("**/*Test.class") + }.files.asSequence() + .sorted() + .map { file -> file.name.replace(".class", "") } + .drop(startIndex) + .take(endIndex - startIndex) + .also { + + println( + "###### integration test shard ${shardNumber.get()} of ${totalShards.get()} includes:\n" + + it.joinToString("\n") + ) + } + .forEach { + this@ShardTestTask.filter.includeTest(it, null) + } + + filterWasSet = true } -} - -registerYamlShardsTasks( - shardCount = shardCount, - startTagName = "### ", - endTagName = "### ", - taskNamePart = "integrationTest", - yamlFile = rootProject.file(".github/workflows/ci.yml") -) -tasks.named("check").dependsOn(integrationTestTask) + @TaskAction + fun execute() { -kotlin { - val compilations = target.compilations - - compilations.getByName("integrationTest") { - associateWith(compilations.getByName("main")) + if (!filterWasSet) { + throw GradleException("This shard test task did not have its filter set.") + } } } diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt index 89e75b6967..5f23fe4479 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AndroidBuildConfigAvoidanceTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt similarity index 97% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt index d460c57178..dca7a56923 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/AnvilPluginParsingTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/BaseGradleTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/BaseGradleTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/BaseGradleTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/BaseGradleTest.kt index ddfedd1ed2..72618a4d75 100644 --- a/modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/BaseGradleTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/BaseGradleTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt similarity index 99% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt index 1afa426239..bc33b0820e 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/ConfigValidationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt similarity index 97% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt index ddd55ab210..261b16c868 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/DepthReportTaskTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt index f17df41ac7..fdddf2bc89 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/GraphReportTaskTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt similarity index 98% rename from modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt index c04f6ca981..64f62d7f84 100644 --- a/modulecheck-gradle/plugin/src/test/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/McGradleTestEnvironment.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -19,7 +19,7 @@ import com.rickbusarow.kase.ParamTestEnvironmentFactory import com.rickbusarow.kase.files.TestLocation import modulecheck.config.CodeGeneratorBinding import modulecheck.config.internal.defaultCodeGeneratorBindings -import modulecheck.gradle.internal.BuildProperties +import modulecheck.gradle.internal.BuildConfig import modulecheck.parsing.kotlin.compiler.impl.DependencyModuleDescriptorAccess import modulecheck.project.ProjectCache import modulecheck.project.generation.ProjectCollector @@ -100,7 +100,7 @@ class McGradleTestEnvironment( useVersion("$agpVersion") } if (requested.id.id == "com.rickbusarow.module-check") { - useVersion("${BuildProperties.version}") + useVersion("${BuildConfig.version}") } if (requested.id.id.startsWith("org.jetbrains.kotlin")) { useVersion("$kotlinVersion") diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt similarity index 96% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt index b76857b784..32834a6392 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/RuntimeClasspathValidationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -17,7 +17,7 @@ package modulecheck.gradle import io.kotest.inspectors.forAll import io.kotest.matchers.string.shouldContain -import modulecheck.gradle.internal.BuildProperties +import modulecheck.gradle.internal.BuildConfig import modulecheck.utils.remove import org.junit.jupiter.api.TestFactory @@ -51,7 +51,7 @@ class RuntimeClasspathValidationTest : BaseGradleTest() { useVersion("$agpVersion") } if (requested.id.id == "com.rickbusarow.module-check") { - useVersion("${BuildProperties.version}") + useVersion("${BuildConfig.version}") } if (requested.id.id.startsWith("org.jetbrains.kotlin")) { useVersion("$kotlinVersion") diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/SortingTaskTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/SortingTaskTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/SortingTaskTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/SortingTaskTest.kt index 46547f9274..3cc7ecfa94 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/SortingTaskTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/SortingTaskTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt index e8193541f0..34462a38e3 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TaskLifecycleTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TasksValidationTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TasksValidationTest.kt similarity index 98% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TasksValidationTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TasksValidationTest.kt index fa2fed0480..7b9bd5bbaa 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/TasksValidationTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/TasksValidationTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt similarity index 99% rename from modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt rename to modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt index 9d8c736181..f3b9fb29ce 100644 --- a/modulecheck-gradle/plugin/src/integrationTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt +++ b/modulecheck-gradle/plugin/src/gradleTest/kotlin/modulecheck/gradle/UnusedDependenciesPluginTest.kt @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2024 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/modulecheck-model/dependency/api/build.gradle.kts b/modulecheck-model/dependency/api/build.gradle.kts index c6b16de773..8a8c031a50 100644 --- a/modulecheck-model/dependency/api/build.gradle.kts +++ b/modulecheck-model/dependency/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-model-dependency-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-model-dependency-api") + } } dependencies { diff --git a/modulecheck-model/dependency/impl/build.gradle.kts b/modulecheck-model/dependency/impl/build.gradle.kts index d6f9bc97f9..cca367be59 100644 --- a/modulecheck-model/dependency/impl/build.gradle.kts +++ b/modulecheck-model/dependency/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-model-dependency-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-model-dependency-impl") + } } dependencies { diff --git a/modulecheck-model/sourceset/api/build.gradle.kts b/modulecheck-model/sourceset/api/build.gradle.kts index 9c97719932..9ed084c5b1 100644 --- a/modulecheck-model/sourceset/api/build.gradle.kts +++ b/modulecheck-model/sourceset/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-model-sourceset-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-model-sourceset-api") + } } dependencies { diff --git a/modulecheck-parsing/android/build.gradle.kts b/modulecheck-parsing/android/build.gradle.kts index 1f553dd5e4..bef17aabbf 100644 --- a/modulecheck-parsing/android/build.gradle.kts +++ b/modulecheck-parsing/android/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-core" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-core") + } } dependencies { diff --git a/modulecheck-parsing/gradle/dsl/api/build.gradle.kts b/modulecheck-parsing/gradle/dsl/api/build.gradle.kts index 1c3287def6..5d7cbbf5d5 100644 --- a/modulecheck-parsing/gradle/dsl/api/build.gradle.kts +++ b/modulecheck-parsing/gradle/dsl/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-dsl-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-dsl-api") + } } dependencies { diff --git a/modulecheck-parsing/gradle/dsl/internal/build.gradle.kts b/modulecheck-parsing/gradle/dsl/internal/build.gradle.kts index f48b675a2c..f5cd89584f 100644 --- a/modulecheck-parsing/gradle/dsl/internal/build.gradle.kts +++ b/modulecheck-parsing/gradle/dsl/internal/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-dsl-internal" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-dsl-internal") + } } dependencies { diff --git a/modulecheck-parsing/gradle/dsl/precompiled/build.gradle.kts b/modulecheck-parsing/gradle/dsl/precompiled/build.gradle.kts index c02738964c..d89df3e21d 100644 --- a/modulecheck-parsing/gradle/dsl/precompiled/build.gradle.kts +++ b/modulecheck-parsing/gradle/dsl/precompiled/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-dsl-precompiled" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-dsl-precompiled") + } } dependencies { diff --git a/modulecheck-parsing/gradle/dsl/testing/build.gradle.kts b/modulecheck-parsing/gradle/dsl/testing/build.gradle.kts index 7296895783..5ff12a4af6 100644 --- a/modulecheck-parsing/gradle/dsl/testing/build.gradle.kts +++ b/modulecheck-parsing/gradle/dsl/testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-dsl-testing" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-dsl-testing") + } } dependencies { diff --git a/modulecheck-parsing/gradle/model/api/build.gradle.kts b/modulecheck-parsing/gradle/model/api/build.gradle.kts index cf6a826a5c..1eb19e6b7f 100644 --- a/modulecheck-parsing/gradle/model/api/build.gradle.kts +++ b/modulecheck-parsing/gradle/model/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-model-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-model-api") + } } dependencies { diff --git a/modulecheck-parsing/gradle/model/impl-typesafe/build.gradle.kts b/modulecheck-parsing/gradle/model/impl-typesafe/build.gradle.kts index ae380fdd4d..75e74363ea 100644 --- a/modulecheck-parsing/gradle/model/impl-typesafe/build.gradle.kts +++ b/modulecheck-parsing/gradle/model/impl-typesafe/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-gradle-model-impl-typesafe" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-gradle-model-impl-typesafe") + } } dependencies { diff --git a/modulecheck-parsing/groovy-antlr/build.gradle.kts b/modulecheck-parsing/groovy-antlr/build.gradle.kts index f026abd4f3..6791f5ce7f 100644 --- a/modulecheck-parsing/groovy-antlr/build.gradle.kts +++ b/modulecheck-parsing/groovy-antlr/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,16 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) groovy } -mcbuild { - published( - artifactId = "modulecheck-parsing-groovy-antlr" - ) +mahout { + publishing { + publishMaven( + artifactId = "modulecheck-parsing-groovy-antlr" + ) + } } dependencies { diff --git a/modulecheck-parsing/java/build.gradle.kts b/modulecheck-parsing/java/build.gradle.kts index 99d19b741f..e945310f8b 100644 --- a/modulecheck-parsing/java/build.gradle.kts +++ b/modulecheck-parsing/java/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-parsing-java" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-java") + } } dependencies { diff --git a/modulecheck-parsing/kotlin-compiler/api/build.gradle.kts b/modulecheck-parsing/kotlin-compiler/api/build.gradle.kts index a63ea9a7cf..8e45db996a 100644 --- a/modulecheck-parsing/kotlin-compiler/api/build.gradle.kts +++ b/modulecheck-parsing/kotlin-compiler/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-parsing-kotlin-compiler-api" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-kotlin-compiler-api") + } } dependencies { diff --git a/modulecheck-parsing/kotlin-compiler/impl/build.gradle.kts b/modulecheck-parsing/kotlin-compiler/impl/build.gradle.kts index e53006a8ea..29849510ef 100644 --- a/modulecheck-parsing/kotlin-compiler/impl/build.gradle.kts +++ b/modulecheck-parsing/kotlin-compiler/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-kotlin-compiler-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-kotlin-compiler-impl") + } } dependencies { diff --git a/modulecheck-parsing/psi/build.gradle.kts b/modulecheck-parsing/psi/build.gradle.kts index 09596912a0..d1c86b2631 100644 --- a/modulecheck-parsing/psi/build.gradle.kts +++ b/modulecheck-parsing/psi/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-parsing-psi" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-psi") + } } dependencies { diff --git a/modulecheck-parsing/source/api/build.gradle.kts b/modulecheck-parsing/source/api/build.gradle.kts index 584a80c5de..bc81dea521 100644 --- a/modulecheck-parsing/source/api/build.gradle.kts +++ b/modulecheck-parsing/source/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-source-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-source-api") + } } dependencies { diff --git a/modulecheck-parsing/source/testing/build.gradle.kts b/modulecheck-parsing/source/testing/build.gradle.kts index 71289dfd61..f9a15e3d84 100644 --- a/modulecheck-parsing/source/testing/build.gradle.kts +++ b/modulecheck-parsing/source/testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-source-testing" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-source-testing") + } } dependencies { diff --git a/modulecheck-parsing/wiring/build.gradle.kts b/modulecheck-parsing/wiring/build.gradle.kts index 0aa5de92bd..1309d0e2ba 100644 --- a/modulecheck-parsing/wiring/build.gradle.kts +++ b/modulecheck-parsing/wiring/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-parsing-wiring" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-parsing-wiring") + } } dependencies { diff --git a/modulecheck-project-generation/api/build.gradle.kts b/modulecheck-project-generation/api/build.gradle.kts index 1217a526c3..2c2920475e 100644 --- a/modulecheck-project-generation/api/build.gradle.kts +++ b/modulecheck-project-generation/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-project-generation-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-project-generation-api") + } } dependencies { diff --git a/modulecheck-project/api/build.gradle.kts b/modulecheck-project/api/build.gradle.kts index 16f2094098..ba2b684473 100644 --- a/modulecheck-project/api/build.gradle.kts +++ b/modulecheck-project/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-project-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-project-api") + } } dependencies { diff --git a/modulecheck-project/impl/build.gradle.kts b/modulecheck-project/impl/build.gradle.kts index fd152647e5..7e97bb3f4c 100644 --- a/modulecheck-project/impl/build.gradle.kts +++ b/modulecheck-project/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-project-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-project-impl") + } } dependencies { diff --git a/modulecheck-project/testing/build.gradle.kts b/modulecheck-project/testing/build.gradle.kts index 779fe058b5..a5b37554a3 100644 --- a/modulecheck-project/testing/build.gradle.kts +++ b/modulecheck-project/testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-project-testing" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-project-testing") + } } dependencies { diff --git a/modulecheck-reporting/checkstyle/build.gradle.kts b/modulecheck-reporting/checkstyle/build.gradle.kts index cf017e78bf..1e6a567c2c 100644 --- a/modulecheck-reporting/checkstyle/build.gradle.kts +++ b/modulecheck-reporting/checkstyle/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-reporting-checkstyle" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-reporting-checkstyle") + } } dependencies { diff --git a/modulecheck-reporting/console/build.gradle.kts b/modulecheck-reporting/console/build.gradle.kts index 9c4fb5742d..76216373ed 100644 --- a/modulecheck-reporting/console/build.gradle.kts +++ b/modulecheck-reporting/console/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-reporting-console" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-reporting-console") + } } dependencies { diff --git a/modulecheck-reporting/graphviz/build.gradle.kts b/modulecheck-reporting/graphviz/build.gradle.kts index 63ee34c8a9..7a7edda379 100644 --- a/modulecheck-reporting/graphviz/build.gradle.kts +++ b/modulecheck-reporting/graphviz/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-reporting-graphviz" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-reporting-graphviz") + } } dependencies { diff --git a/modulecheck-reporting/logging/api/build.gradle.kts b/modulecheck-reporting/logging/api/build.gradle.kts index c5fbf20876..402d12d30a 100644 --- a/modulecheck-reporting/logging/api/build.gradle.kts +++ b/modulecheck-reporting/logging/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-reporting-logging-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-reporting-logging-api") + } } dependencies { diff --git a/modulecheck-reporting/logging/testing/build.gradle.kts b/modulecheck-reporting/logging/testing/build.gradle.kts index 5e9b3b9dc2..b54e551306 100644 --- a/modulecheck-reporting/logging/testing/build.gradle.kts +++ b/modulecheck-reporting/logging/testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-reporting-logging-testing" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-reporting-logging-testing") + } } dependencies { diff --git a/modulecheck-rule/api/build.gradle.kts b/modulecheck-rule/api/build.gradle.kts index 1e4f62fa3f..4aa0c943bd 100644 --- a/modulecheck-rule/api/build.gradle.kts +++ b/modulecheck-rule/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-rule-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-rule-api") + } } dependencies { diff --git a/modulecheck-rule/impl-factory/build.gradle.kts b/modulecheck-rule/impl-factory/build.gradle.kts index fd2bd07920..f3ee6f4b5a 100644 --- a/modulecheck-rule/impl-factory/build.gradle.kts +++ b/modulecheck-rule/impl-factory/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-rule-impl-factory" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-rule-impl-factory") + } } dependencies { diff --git a/modulecheck-rule/impl/build.gradle.kts b/modulecheck-rule/impl/build.gradle.kts index fe40da0a3e..02270869f0 100644 --- a/modulecheck-rule/impl/build.gradle.kts +++ b/modulecheck-rule/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-rule-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-rule-impl") + } } dependencies { diff --git a/modulecheck-runtime/api/build.gradle.kts b/modulecheck-runtime/api/build.gradle.kts index ef4d13ad27..81acc8f882 100644 --- a/modulecheck-runtime/api/build.gradle.kts +++ b/modulecheck-runtime/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-runtime-api" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-runtime-api") + } } dependencies { diff --git a/modulecheck-runtime/testing/build.gradle.kts b/modulecheck-runtime/testing/build.gradle.kts index f88ecc2edc..f14340a607 100644 --- a/modulecheck-runtime/testing/build.gradle.kts +++ b/modulecheck-runtime/testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-runtime-testing" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-runtime-testing") + } } dependencies { diff --git a/modulecheck-utils/cache/build.gradle.kts b/modulecheck-utils/cache/build.gradle.kts index 130ae40155..6361d82ef4 100644 --- a/modulecheck-utils/cache/build.gradle.kts +++ b/modulecheck-utils/cache/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-cache" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-cache") + } } dependencies { diff --git a/modulecheck-utils/coroutines/api/build.gradle.kts b/modulecheck-utils/coroutines/api/build.gradle.kts index e99f7b01c4..4d2cd53504 100644 --- a/modulecheck-utils/coroutines/api/build.gradle.kts +++ b/modulecheck-utils/coroutines/api/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-coroutines-api" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-coroutines-api") + } } dependencies { diff --git a/modulecheck-utils/coroutines/impl/build.gradle.kts b/modulecheck-utils/coroutines/impl/build.gradle.kts index 85cca7e53d..529b528c20 100644 --- a/modulecheck-utils/coroutines/impl/build.gradle.kts +++ b/modulecheck-utils/coroutines/impl/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,14 +14,14 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) + alias(libs.plugins.anvil) } -mcbuild { - published( - artifactId = "modulecheck-utils-coroutines-impl" - ) - anvil() +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-coroutines-impl") + } } dependencies { diff --git a/modulecheck-utils/lazy/build.gradle.kts b/modulecheck-utils/lazy/build.gradle.kts index ff13f14800..4bf3309b4c 100644 --- a/modulecheck-utils/lazy/build.gradle.kts +++ b/modulecheck-utils/lazy/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-lazy" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-lazy") + } } dependencies { diff --git a/modulecheck-utils/stdlib/build.gradle.kts b/modulecheck-utils/stdlib/build.gradle.kts index 1f5cf170db..14f737e980 100644 --- a/modulecheck-utils/stdlib/build.gradle.kts +++ b/modulecheck-utils/stdlib/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-stdlib" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-stdlib") + } } dependencies { diff --git a/modulecheck-utils/trace-testing/build.gradle.kts b/modulecheck-utils/trace-testing/build.gradle.kts index 9e9708af17..2165749997 100644 --- a/modulecheck-utils/trace-testing/build.gradle.kts +++ b/modulecheck-utils/trace-testing/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-trace-testing" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-trace-testing") + } } dependencies { diff --git a/modulecheck-utils/trace/build.gradle.kts b/modulecheck-utils/trace/build.gradle.kts index 7dd9d19255..8f2eb8bca3 100644 --- a/modulecheck-utils/trace/build.gradle.kts +++ b/modulecheck-utils/trace/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-trace" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-trace") + } } dependencies { diff --git a/modulecheck-utils/traversal/build.gradle.kts b/modulecheck-utils/traversal/build.gradle.kts index eac9eb8575..27848962dc 100644 --- a/modulecheck-utils/traversal/build.gradle.kts +++ b/modulecheck-utils/traversal/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021-2023 Rick Busarow + * Copyright (C) 2021-2025 Rick Busarow * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -14,13 +14,13 @@ */ plugins { - id("mcbuild") + alias(libs.plugins.mahout.kotlin.jvm.module) } -mcbuild { - published( - artifactId = "modulecheck-utils-traversal" - ) +mahout { + publishing { + publishMaven(artifactId = "modulecheck-utils-traversal") + } } dependencies { diff --git a/settings.gradle.kts b/settings.gradle.kts index 1b0d4ad7e3..f26387ba25 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -17,48 +17,35 @@ rootProject.name = "ModuleCheck" pluginManagement { - val allowMavenLocal = providers - .gradleProperty("moduleCheck.allow-maven-local") - .orNull.toBoolean() - repositories { - if (allowMavenLocal) { - logger.lifecycle("${rootProject.name} -- allowing mavenLocal for plugins") - mavenLocal() - } - gradlePluginPortal() - mavenCentral() - google() maven { - url = uri("https://oss.sonatype.org/content/repositories/snapshots/") + url = uri("https://central.sonatype.com/repository/maven-snapshots/") content { + @Suppress("UnstableApiUsage") + includeGroupAndSubgroups("com.rickbusarow.mahout") includeGroup("com.rickbusarow.module-check") includeGroup("com.rickbusarow.modulecheck") } } + gradlePluginPortal() + mavenCentral() + google() } includeBuild("build-logic") } -val allowMavenLocal = providers - .gradleProperty("moduleCheck.allow-maven-local") - .orNull.toBoolean() - dependencyResolutionManagement { @Suppress("UnstableApiUsage") repositories { - if (allowMavenLocal) { - logger.lifecycle("${rootProject.name} -- allowing mavenLocal for dependencies") - mavenLocal() - } mavenCentral() google() - maven("https://plugins.gradle.org/m2/") } } plugins { id("com.gradle.develocity") version "4.0.2" + id("com.gradle.common-custom-user-data-gradle-plugin") version "2.2.1" + id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" } val isCI = System.getenv("CI")?.toBoolean() == true