Skip to content

Address inspection hints #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class AbstractDependencyExtractorPlugin : Plugin<Gradle> {
*/
abstract fun getRendererClassName(): String

internal lateinit var dependencyExtractorProvider: Provider<out DependencyExtractor>
private lateinit var dependencyExtractorProvider: Provider<out DependencyExtractor>

override fun apply(gradle: Gradle) {
val gradleVersion = GradleVersion.current()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ abstract class DependencyExtractor :
val rootPath = projectIdentityPath ?: details.buildPath

if (!configurationFilter.include(rootPath, details.configurationName)) {
LOGGER.debug("Ignoring resolved configuration: ${rootPath} - ${details.configurationName}")
LOGGER.debug("Ignoring resolved configuration: $rootPath - ${details.configurationName}")
return
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.gradle.dependencygraph.extractor

class ResolvedConfigurationFilter(projectFilter: String?, configurationFilter: String?) {
val projectRegex = projectFilter?.toRegex()
val configurationRegex = configurationFilter?.toRegex()
private val projectRegex = projectFilter?.toRegex()
private val configurationRegex = configurationFilter?.toRegex()

fun include(projectPath: String, configurationName: String): Boolean {
if (projectRegex != null && !projectRegex.matches(projectPath)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.gradle.api.Plugin
import org.gradle.api.invocation.Gradle
import org.gradle.dependencygraph.AbstractDependencyExtractorPlugin
import org.gradle.forceresolve.ForceDependencyResolutionPlugin
import org.gradle.github.GitHubDependencyExtractorPlugin

@Suppress("unused")
class SimpleDependencyGraphPlugin : Plugin<Gradle> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import org.gradle.api.provider.ProviderFactory
import org.gradle.internal.operations.BuildOperationListenerManager

internal abstract class GradleExtensions {

inline val Gradle.objectFactory: ObjectFactory
get() = service()

inline val Gradle.providerFactory: ProviderFactory
get() = service()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.gradle.dependencygraph.model.ResolvedConfiguration
import org.gradle.dependencygraph.util.*
import java.io.File

class GitHubDependencyGraphRenderer() : DependencyGraphRenderer {
class GitHubDependencyGraphRenderer : DependencyGraphRenderer {

override fun outputDependencyGraph(
pluginParameters: PluginParameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const val PARAM_GITHUB_SHA = "GITHUB_DEPENDENCY_GRAPH_SHA"
*/
const val PARAM_GITHUB_WORKSPACE = "GITHUB_DEPENDENCY_GRAPH_WORKSPACE"

class GitHubSnapshotParams(private val pluginParameters: PluginParameters) {
class GitHubSnapshotParams(pluginParameters: PluginParameters) {
val dependencyGraphJobCorrelator: String = pluginParameters.load(PARAM_JOB_CORRELATOR)
val dependencyGraphJobId: String =pluginParameters.load(PARAM_JOB_ID)
val gitSha: String = pluginParameters.load(PARAM_GITHUB_SHA)
Expand Down