File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
gradle-plugin-conventions
src/main/kotlin/io/technoirlab/conventions/gradle/plugin Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ dependencies {
22
22
functionalTestImplementation(testFixtures(project(" :common-conventions" )))
23
23
functionalTestImplementation(project(" :libraries:gradle-test-kit" ))
24
24
functionalTestImplementation(libs.assertj.core)
25
+
26
+ compileOnly(libs.dependency.analysis.gradle.plugin)
25
27
}
26
28
27
29
gradlePlugin {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import io.technoirlab.conventions.common.configuration.configurePublishing
15
15
import io.technoirlab.conventions.common.configuration.configureTestFixtures
16
16
import io.technoirlab.conventions.common.configuration.configureTesting
17
17
import io.technoirlab.conventions.gradle.plugin.api.GradlePluginExtension
18
+ import io.technoirlab.conventions.gradle.plugin.configuration.configureDependencyAnalysis
18
19
import io.technoirlab.conventions.gradle.plugin.configuration.configurePlugin
19
20
import io.technoirlab.gradle.Environment
20
21
import org.gradle.api.Plugin
@@ -65,5 +66,6 @@ class GradlePluginConventionPlugin : Plugin<Project> {
65
66
configurePlugin(config.metadata, environment)
66
67
configureTesting()
67
68
configureTestFixtures()
69
+ configureDependencyAnalysis()
68
70
}
69
71
}
Original file line number Diff line number Diff line change
1
+ package io.technoirlab.conventions.gradle.plugin.configuration
2
+
3
+ import com.autonomousapps.DependencyAnalysisSubExtension
4
+ import org.gradle.api.Project
5
+ import org.gradle.kotlin.dsl.configure
6
+
7
+ internal fun Project.configureDependencyAnalysis () {
8
+ pluginManager.withPlugin(" com.autonomousapps.dependency-analysis" ) {
9
+ extensions.configure(DependencyAnalysisSubExtension ::class ) {
10
+ issues {
11
+ // Do not suggest changing the dependency on api feature variant from api to implementation
12
+ onIncorrectConfiguration {
13
+ exclude(path)
14
+ }
15
+ // Do not report the dependency on api feature variant as unused
16
+ onUnusedDependencies {
17
+ exclude(path)
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
You can’t perform that action at this time.
0 commit comments