Skip to content

Commit

Permalink
Merge pull request #155 from littlerobots/fix/new-resolver-tests
Browse files Browse the repository at this point in the history
Add tests for new resolver mode
  • Loading branch information
hvisser authored Oct 16, 2024
2 parents 926631b + b0c4025 commit 95cc88e
Show file tree
Hide file tree
Showing 11 changed files with 1,912 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ abstract class BaseVersionCatalogUpdateTask : DefaultTask() {
get() = false
@get:Internal
protected open val keepUnusedEntriesByDefault
get() = true
get() = false

private val pinRefs by lazy {
pins.orNull?.getVersionCatalogRefs() ?: emptySet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ abstract class ExperimentalVersionCatalogUpdateTask @Inject constructor(private
val keepConfiguration = objectFactory.newInstance(KeepConfiguration::class.java)
keepConfiguration.keepUnusedLibraries.set(true)
keepConfiguration.keepUnusedPlugins.set(true)
keepConfiguration.keepUnusedVersions.set(this.keep.orNull?.keepUnusedVersions?.getOrElse(false))
val keepConfigurationInput = objectFactory.newInstance(KeepConfigurationInput::class.java, keepConfiguration)
keep.set(keepConfigurationInput)
super.updateCatalog()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ internal class DependencyResolver {
currentPluginConfiguration.dependencies.add(dependencyHandler.create("${it.id}:${it.id}.gradle.plugin"))
currentPluginConfiguration.dependencyConstraints.add(
dependencyHandler.constraints.create(
pluginConfiguration.name
"${it.id}:${it.id}.gradle.plugin"
) { constraint ->
configureConstraint(constraint, version)
}
Expand Down
Loading

0 comments on commit 95cc88e

Please sign in to comment.