Skip to content

Commit

Permalink
Use JavaPluginExtension instead of deprecated JavaPluginConvention
Browse files Browse the repository at this point in the history
Closes gh-32
  • Loading branch information
rainboyan committed Oct 15, 2024
2 parents 9e32363 + 736dce8 commit 0aafc3e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022-2023 the original author or authors.
* Copyright 2022-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.
Expand All @@ -18,7 +18,7 @@ package grails.views.gradle.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

Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 0aafc3e

Please sign in to comment.