Skip to content
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
4 changes: 2 additions & 2 deletions buildSrc/quality/pmd.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>

<!--
~ Copyright 2025, TeamDev. All rights reserved.
~ Copyright 2026, TeamDev. All rights reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,10 +60,10 @@
<rule ref="category/java/codestyle.xml/ControlStatementBraces"/>
<rule ref="category/java/codestyle.xml/ExtendsObject"/>
<rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass"/>
<rule ref="category/java/codestyle.xml/GenericsNaming"/>
<rule ref="category/java/codestyle.xml/MethodNamingConventions"/>
<rule ref="category/java/codestyle.xml/NoPackage"/>
<rule ref="category/java/codestyle.xml/PackageCase"/>
<rule ref="category/java/codestyle.xml/TypeParameterNamingConventions"/>
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class GradleTaskTest {
@Test
fun `create an instance from an existing Gradle task`() {
val project = ProjectBuilder.builder().build()
val task = project.tasks.create("existingTask")
val task = project.tasks.register("existingTask").get()

val gradleTask = GradleTask.from(task)

Expand All @@ -58,16 +58,16 @@ class GradleTaskTest {
@Test
fun `provide a string representation`() {
val project = ProjectBuilder.builder().build()
val task = project.tasks.create("aTask")
val task = project.tasks.register("aTask").get()

GradleTask.from(task).toString() shouldContain "GradleTask"
}

@Test
fun `support equality`() {
val project = ProjectBuilder.builder().build()
val taskA = project.tasks.create("taskA")
val taskB = project.tasks.create("taskB")
val taskA = project.tasks.register("taskA").get()
val taskB = project.tasks.register("taskB").get()

EqualsTester()
.addEqualityGroup(GradleTask.from(taskA), GradleTask.from(taskA))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ internal class TaskDependenciesSpec {
@BeforeEach
fun setUp() {
val project = ProjectBuilder.builder().build()
ontoTask = project.tasks.create("ontoTask")
task = project.tasks.create("dependent")
ontoTask = project.tasks.register("ontoTask").get()
task = project.tasks.register("dependent").get()
}

@Test
Expand Down
Loading