Skip to content

Commit 9f2bcf3

Browse files
RBusarowkodiakhq[bot]
authored andcommitted
address Detekt changes
1 parent 67bddb8 commit 9f2bcf3

19 files changed

Lines changed: 230 additions & 533 deletions

File tree

build-logic/conventions/src/main/kotlin/modulecheck/builds/KotlinJvmConventionPlugin.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package modulecheck.builds
1818
import com.rickbusarow.kgx.applyOnce
1919
import com.rickbusarow.kgx.dependsOn
2020
import com.rickbusarow.kgx.javaExtension
21+
import com.rickbusarow.kgx.names.ConfigurationName
2122
import org.gradle.api.JavaVersion
2223
import org.gradle.api.Plugin
2324
import org.gradle.api.Project
@@ -48,6 +49,11 @@ abstract class KotlinJvmConventionPlugin : Plugin<Project> {
4849
extension.sourceCompatibility = JavaVersion.toVersion(target.JVM_TARGET)
4950
}
5051

52+
target.dependencies.add(
53+
ConfigurationName.implementation.value,
54+
target.dependencies.platform(target.libs.kotlin.bom)
55+
)
56+
5157
target.tasks.withType(KotlinCompile::class.java).configureEach { task ->
5258
task.kotlinOptions {
5359
allWarningsAsErrors = false

dependency-guard-aggregate.txt

Lines changed: 179 additions & 120 deletions
Large diffs are not rendered by default.

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ changeTracker = "0.7.4"
2525
classgraph = "4.8.162"
2626
commons-io = "2.15.1"
2727
dependencyAnalysis = "1.20.0"
28-
detekt = "1.23.1"
28+
detekt = "1.23.4"
2929
diffplug-spotless = "6.24.0"
3030
dokka = "1.9.10"
3131
dropbox-dependencyGuard = "0.4.3"

modulecheck-api/src/main/kotlin/modulecheck/api/context/AnvilGraph.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -50,9 +50,10 @@ data class AnvilScopedDeclarations(
5050

5151
/**
5252
* Represents a graph of Anvil scopes and their associated declarations.
53-
* @property project the [McProject] for which this graph is defined
54-
* @property delegate a cache that maps from [SourceSetName]
55-
* to a map of [AnvilScopeName] to [AnvilScopedDeclarations]
53+
*
54+
* @param project the [McProject] for which this graph is defined
55+
* @param delegate a cache that maps from [SourceSetName] to
56+
* a map of [AnvilScopeName] to [AnvilScopedDeclarations]
5657
*/
5758
data class AnvilGraph(
5859
private val project: McProject,

modulecheck-api/src/main/kotlin/modulecheck/api/context/JvmFiles.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -32,7 +32,7 @@ import java.io.File
3232
*
3333
* @property fileFactoryCache a cache for mapping source
3434
* set names to corresponding JVM file providers
35-
* @property project the project for which the JVM files are needed
35+
* @param project the project for which the JVM files are needed
3636
*/
3737
data class JvmFiles(
3838
internal val fileFactoryCache: SafeCache<SourceSetName, JvmFileProvider>,

modulecheck-api/src/main/kotlin/modulecheck/api/context/JvmSourceFiles.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -24,9 +24,9 @@ import java.io.File
2424
/**
2525
* All JVM source files for a specific source set in a project.
2626
*
27-
* @property delegate a [SafeCache] instance which manages a
28-
* cache of source set names to the associated JVM source files.
29-
* @property project the [McProject] for which the source files are retrieved.
27+
* @param delegate a [SafeCache] instance which manages a cache
28+
* of source set names to the associated JVM source files.
29+
* @param project the [McProject] for which the source files are retrieved.
3030
*/
3131
data class JvmSourceFiles(
3232
private val delegate: SafeCache<SourceSetName, Set<File>>,

modulecheck-api/src/main/kotlin/modulecheck/api/context/uses.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -46,7 +46,7 @@ suspend fun McProject.uses(dependency: ConfiguredDependency): Boolean {
4646
private suspend fun <T> McProject.usesCodeGenDependency(
4747
dependency: T
4848
): Boolean where T : ConfiguredDependency,
49-
T : MightHaveCodeGeneratorBinding {
49+
T : MightHaveCodeGeneratorBinding {
5050

5151
val codeGeneratorBinding = dependency.codeGeneratorBindingOrNull
5252
// If the dependency doesn't have a binding, default to treating it as used

modulecheck-core/src/main/kotlin/modulecheck/core/context/UnusedKaptProcessors.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -28,9 +28,9 @@ import modulecheck.utils.mapToSet
2828
/**
2929
* Represents a data class that contains all unused Kapt processors in a project.
3030
*
31-
* @property delegate a [SafeCache] instance which manages a cache
32-
* of configuration names to the associated unused Kapt processors.
33-
* @property project the [McProject] for which the unused Kapt processors are retrieved.
31+
* @param delegate a [SafeCache] instance which manages a cache of
32+
* configuration names to the associated unused Kapt processors.
33+
* @param project the [McProject] for which the unused Kapt processors are retrieved.
3434
*/
3535
data class UnusedKaptProcessors(
3636
private val delegate: SafeCache<ConfigurationName, Set<UnusedKaptProcessorFinding>>,

modulecheck-gradle/platforms/internal-android/src/main/kotlin/modulecheck/gradle/platforms/android/RealAndroidPlatformPluginFactory.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021-2023 Rick Busarow
2+
* Copyright (C) 2021-2024 Rick Busarow
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -45,9 +45,9 @@ import kotlin.LazyThreadSafetyMode.NONE
4545
* Factory for creating [AndroidPlatformPlugin] instances
4646
* based on the type of Android Gradle Plugin (AGP) extension.
4747
*
48-
* @property agpApiAccess Provides access to AGP APIs.
49-
* @property configurationsFactory Factory for creating [Configurations] instances.
50-
* @property sourceSetsFactory Factory for creating [SourceSets] instances.
48+
* @param agpApiAccess Provides access to AGP APIs.
49+
* @param configurationsFactory Factory for creating [Configurations] instances.
50+
* @param sourceSetsFactory Factory for creating [SourceSets] instances.
5151
*/
5252
@ContributesBinding(TaskScope::class)
5353
class RealAndroidPlatformPluginFactory @Inject constructor(

0 commit comments

Comments
 (0)