Skip to content

Commit cbea901

Browse files
committed
split up :modulecheck-core into -finding and -rule modules
1 parent b3da4b8 commit cbea901

96 files changed

Lines changed: 1303 additions & 641 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

artifacts.json

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@
5555
"packaging": "jar",
5656
"javaVersion": "11"
5757
},
58+
{
59+
"gradlePath": ":modulecheck-finding:impl",
60+
"group": "com.rickbusarow.modulecheck",
61+
"artifactId": "modulecheck-finding-impl",
62+
"description": "Fast dependency graph linting for Gradle projects",
63+
"packaging": "jar",
64+
"javaVersion": "11"
65+
},
66+
{
67+
"gradlePath": ":modulecheck-finding:impl-android",
68+
"group": "com.rickbusarow.modulecheck",
69+
"artifactId": "modulecheck-finding-impl-android",
70+
"description": "Fast dependency graph linting for Gradle projects",
71+
"packaging": "jar",
72+
"javaVersion": "11"
73+
},
74+
{
75+
"gradlePath": ":modulecheck-finding:impl-sort",
76+
"group": "com.rickbusarow.modulecheck",
77+
"artifactId": "modulecheck-finding-impl-sort",
78+
"description": "Fast dependency graph linting for Gradle projects",
79+
"packaging": "jar",
80+
"javaVersion": "11"
81+
},
5882
{
5983
"gradlePath": ":modulecheck-finding:name",
6084
"group": "com.rickbusarow.modulecheck",
@@ -175,6 +199,22 @@
175199
"packaging": "jar",
176200
"javaVersion": "11"
177201
},
202+
{
203+
"gradlePath": ":modulecheck-rule:impl-factory",
204+
"group": "com.rickbusarow.modulecheck",
205+
"artifactId": "modulecheck-rule-impl-factory",
206+
"description": "Fast dependency graph linting for Gradle projects",
207+
"packaging": "jar",
208+
"javaVersion": "11"
209+
},
210+
{
211+
"gradlePath": ":modulecheck-rule:testing",
212+
"group": "com.rickbusarow.modulecheck",
213+
"artifactId": "modulecheck-rule-testing",
214+
"description": "Fast dependency graph linting for Gradle projects",
215+
"packaging": "jar",
216+
"javaVersion": "11"
217+
},
178218
{
179219
"gradlePath": ":modulecheck-runtime:api",
180220
"group": "com.rickbusarow.modulecheck",
@@ -303,4 +343,4 @@
303343
"packaging": "jar",
304344
"javaVersion": "11"
305345
}
306-
]
346+
]

build-logic/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ android.useAndroidX=true
2121
kotlin.code.style=official
2222
kotlin.caching.enabled=true
2323
kotlin.incremental=true
24+
kapt.include.compile.classpath=false

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ moduleCheck {
5454
depths.enabled = true
5555
graphs {
5656
enabled = true
57-
outputDir = File(buildDir, "reports/modulecheck/graphs").path
57+
// outputDir = File(buildDir, "reports/modulecheck/graphs").path
5858
}
5959
}
6060
}

detekt/detekt-baseline.xml

Lines changed: 201 additions & 190 deletions
Large diffs are not rendered by default.

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ android.useAndroidX=true
2121
kotlin.code.style=official
2222
kotlin.caching.enabled=true
2323
kotlin.incremental=true
24+
kapt.include.compile.classpath=false

modulecheck-api/src/main/kotlin/modulecheck/api/DepthFinding.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import modulecheck.utils.lazyDeferred
2828
import java.io.File
2929

3030
data class DepthFinding(
31-
override val findingName: FindingName,
3231
override val dependentProject: McProject,
3332
override val dependentPath: StringProjectPath,
3433
val depth: Int,
@@ -37,6 +36,8 @@ data class DepthFinding(
3736
override val buildFile: File
3837
) : Finding, Comparable<DepthFinding> {
3938

39+
override val findingName = NAME
40+
4041
override val message: String
4142
get() = "The longest path between this module and its leaf nodes"
4243
override val positionOrNull: LazyDeferred<Position?> = lazyDeferred { null }
@@ -77,4 +78,8 @@ data class DepthFinding(
7778
"sourceSetName=$sourceSetName" +
7879
")"
7980
}
81+
82+
companion object {
83+
val NAME = FindingName("project-depth")
84+
}
8085
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ data class ProjectDepth(
8686
private val treeCache = SafeCache<SourceSetName, Set<ProjectDepth>>()
8787

8888
fun toFinding(name: FindingName): DepthFinding = DepthFinding(
89-
findingName = name,
9089
dependentProject = dependentProject,
9190
dependentPath = dependentPath,
9291
depth = depth,

modulecheck-core/src/main/kotlin/modulecheck/core/context/MustBeApi.kt renamed to modulecheck-api/src/main/kotlin/modulecheck/api/context/MustBeApi.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,14 @@
1313
* limitations under the License.
1414
*/
1515

16-
package modulecheck.core.context
16+
package modulecheck.api.context
1717

1818
import kotlinx.coroutines.flow.asFlow
1919
import kotlinx.coroutines.flow.filter
2020
import kotlinx.coroutines.flow.flattenMerge
2121
import kotlinx.coroutines.flow.map
2222
import kotlinx.coroutines.flow.toList
2323
import kotlinx.coroutines.flow.toSet
24-
import modulecheck.api.context.anvilGraph
25-
import modulecheck.api.context.anvilScopeContributionsForSourceSetName
26-
import modulecheck.api.context.classpathDependencies
27-
import modulecheck.api.context.declarations
28-
import modulecheck.api.context.dependencySources
29-
import modulecheck.api.context.jvmFilesForSourceSetName
3024
import modulecheck.parsing.gradle.model.ConfigurationName
3125
import modulecheck.parsing.gradle.model.ConfiguredProjectDependency
3226
import modulecheck.parsing.gradle.model.SourceSetName

modulecheck-core/src/main/kotlin/modulecheck/core/internal/uses.kt renamed to modulecheck-api/src/main/kotlin/modulecheck/api/context/uses.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,11 @@
1313
* limitations under the License.
1414
*/
1515

16-
package modulecheck.core.internal
16+
package modulecheck.api.context
1717

1818
import kotlinx.coroutines.flow.filter
1919
import kotlinx.coroutines.flow.filterIsInstance
2020
import kotlinx.coroutines.flow.toSet
21-
import modulecheck.api.context.anvilGraph
22-
import modulecheck.api.context.anvilScopeContributionsForSourceSetName
23-
import modulecheck.api.context.declarations
24-
import modulecheck.api.context.dependents
25-
import modulecheck.api.context.referencesForSourceSetName
2621
import modulecheck.parsing.gradle.model.ConfiguredProjectDependency
2722
import modulecheck.parsing.gradle.model.SourceSetName
2823
import modulecheck.parsing.source.Generated

modulecheck-core/src/main/kotlin/modulecheck/core/kapt/defaultCodeGeneratorBindings.kt renamed to modulecheck-config/api/src/main/kotlin/modulecheck/config/internal/defaultCodeGeneratorBindings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
package modulecheck.core.kapt
16+
package modulecheck.config.internal
1717

1818
import modulecheck.config.CodeGeneratorBinding
1919
import modulecheck.parsing.gradle.model.PluginDefinition

0 commit comments

Comments
 (0)