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

Make sure the plugin can be used with Gradle 7 #624

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -10,7 +10,6 @@ import org.gradle.api.distribution.DistributionContainer
import org.gradle.api.file.CopySpec
import org.gradle.api.plugins.ApplicationPlugin
import org.gradle.api.plugins.ApplicationPluginConvention
import org.gradle.api.plugins.MavenPlugin
import org.gradle.api.tasks.Sync
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.application.CreateStartScripts
Expand Down Expand Up @@ -40,7 +39,7 @@ class ShadowApplicationPlugin implements Plugin<Project> {
configureJarMainClass(project)
configureInstallTask(project)

project.plugins.withType(MavenPlugin) {
project.pluginManager.withPlugin('maven') {
project.configurations.archives.with {
artifacts.findAll {
if (it.hasProperty("provider")) {
Expand Down
Expand Up @@ -98,7 +98,7 @@ class ShadowJavaPlugin implements Plugin<Project> {
private void configureShadowUpload() {
configurationActionContainer.add(new Action<Project>() {
void execute(Project project) {
project.plugins.withType(MavenPlugin) {
project.pluginManager.withPlugin('maven') {
project.tasks.withType(Upload).configureEach { upload ->
if (upload.name != SHADOW_UPLOAD_TASK) {
return
Expand Down