Skip to content
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

Fix useLatestVersions #250

Merged
merged 1 commit into from
Dec 29, 2021
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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
implementation "com.diffplug.spotless:spotless-plugin-gradle:5.14.2"
implementation "com.adarshr:gradle-test-logger-plugin:3.0.0"
implementation "io.github.gradle-nexus:publish-plugin:1.1.0"
implementation "se.patrikerdes:gradle-use-latest-versions-plugin:0.2.16"
implementation "se.patrikerdes:gradle-use-latest-versions-plugin:0.2.18"
implementation('com.lowagie:itext:2.0.8')
implementation 'org.jsoup:jsoup:1.14.2'
implementation('org.xhtmlrenderer:core-renderer:8.0') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.micronaut.build

import io.micronaut.build.catalogs.MicronautVersionCatalogUpdatePlugin
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
Expand All @@ -18,6 +19,12 @@ class MicronautDependencyUpdatesPlugin implements Plugin<Project> {
@Override
void apply(Project project) {
project.pluginManager.apply(MicronautBuildExtensionPlugin)
if (project.rootProject.file("gradle/libs.versions.toml").exists()) {
if (project == project.rootProject) {
project.pluginManager.apply(MicronautVersionCatalogUpdatePlugin)
}
return
}
project.apply plugin: GRADLE_VERSIONS_PLUGIN
project.apply plugin: USE_LATEST_VERSIONS_PLUGIN

Expand All @@ -32,7 +39,7 @@ class MicronautDependencyUpdatesPlugin implements Plugin<Project> {
project.with {
tasks.named("dependencyUpdates") {
onlyIf {
gradle.taskGraph.hasTask("useLatestVersions")
gradle.taskGraph.hasTask(":useLatestVersions")
}
checkForGradleUpdate = true
gradleReleaseChannel = "current"
Expand Down