Skip to content

Commit

Permalink
gradle 8 support (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Feb 15, 2023
1 parent b78da54 commit 648e84d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Gradle 8 support (#77)

### 4.8.0 (2022-07-02)
* Update checkstyle 9.1 -> 10.3.1
IMPORTANT: Checkstyle 10 requires java 11, but plugin will automatically switch to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,18 @@ class ReportUtils {
* @param report report instance
* @return report destination file
*/
@CompileStatic(TypeCheckingMode.SKIP)
static File getReportFile(Report report) {
if (report == null) {
return null
}
return GradleVersion.current() < GradleVersion.version('7.0')
? report.destination : report.outputLocation.get().asFile
if (GradleVersion.current() < GradleVersion.version('7.0')) {
return report.destination
}
// Provider for gradle 7 and Property for gradle 8
// static compilation must be disabled for method!
Object output = report.outputLocation
return output.get().asFile
}

private static String matchRoot(SourceSet set, String filePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.gradle.testkit.runner.TaskOutcome
class UpstreamKitTest extends AbstractKitTest {


public static final String GRADLE = '7.4.2'
public static final String GRADLE = '8.0'

def "Check java checks"() {
setup:
Expand Down

0 comments on commit 648e84d

Please sign in to comment.