From 31959039befe45fb3304f00dd848872f2e303268 Mon Sep 17 00:00:00 2001 From: Michael Yan Date: Sat, 29 Jun 2024 18:31:43 +0800 Subject: [PATCH] Gradle: Use `JavaPluginExtension` instead of deprecated `JavaPluginConvention` --- .../groovy/org/grails/gradle/plugin/util/SourceSets.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/util/SourceSets.groovy b/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/util/SourceSets.groovy index 4d576294d2..941495366d 100644 --- a/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/util/SourceSets.groovy +++ b/grace-gradle-plugin/src/main/groovy/org/grails/gradle/plugin/util/SourceSets.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2014-2022 the original author or authors. + * Copyright 2014-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,7 @@ package org.grails.gradle.plugin.util import groovy.transform.CompileStatic import org.gradle.api.GradleException import org.gradle.api.Project -import org.gradle.api.plugins.JavaPluginConvention +import org.gradle.api.plugins.JavaPluginExtension import org.gradle.api.tasks.SourceSet import org.gradle.api.tasks.SourceSetContainer @@ -51,7 +51,7 @@ class SourceSets { } static SourceSetContainer findSourceSets(Project project) { - JavaPluginConvention plugin = project.getConvention().getPlugin(JavaPluginConvention) + JavaPluginExtension plugin = project.getExtensions().getByType(JavaPluginExtension) SourceSetContainer sourceSets = plugin?.sourceSets sourceSets }