Skip to content

Commit

Permalink
Update dependency gradle to v8.3 (#1722)
Browse files Browse the repository at this point in the history
* Update dependency gradle to v8.3
* removed using deprecated buildDir

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nariman Abdullin <[email protected]>
  • Loading branch information
renovate[bot] and nulls authored Aug 28, 2023
1 parent 604657d commit 618daed
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import groovy.lang.Closure
import org.gradle.api.Project
import java.io.File
import java.nio.file.Files
import java.nio.file.Paths

@Suppress(
"MISSING_KDOC_TOP_LEVEL",
Expand Down Expand Up @@ -79,10 +78,13 @@ fun Project.getReporterType(diktatExtension: DiktatExtension): String {
* @return destination [File] or null if stdout is used
*/
internal fun Project.getOutputFile(diktatExtension: DiktatExtension): File? = when {
diktatExtension.githubActions -> {
val reportDir = Files.createDirectories(Paths.get("${project.buildDir}/reports/diktat"))
reportDir.resolve("diktat.sarif").toFile()
}
diktatExtension.githubActions -> project.layout.buildDirectory
.file("reports/diktat/diktat.sarif")
.get()
.asFile
.also {
Files.createDirectories(it.parentFile.toPath())
}
diktatExtension.output.isNotEmpty() -> file(diktatExtension.output)
else -> null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ abstract class SarifReportMergeTask : DefaultTask(), VerificationTask {
internal fun Project.configureMergeReportsTask(diktatExtension: DiktatExtension) {
if (path == rootProject.path) {
tasks.register(MERGE_SARIF_REPORTS_TASK_NAME, SarifReportMergeTask::class.java) { reportMergeTask ->
val diktatReportsDir = "${project.buildDir}/reports/diktat"
val mergedReportFile = project.file("$diktatReportsDir/diktat-merged.sarif")
val mergedReportFile = project.layout.buildDirectory.file("reports/diktat/diktat-merged.sarif")
reportMergeTask.outputs.file(mergedReportFile)
reportMergeTask.output.set(mergedReportFile)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class DiktatJavaExecTaskTest {

@AfterEach
fun tearDown() {
project.buildDir.deleteRecursively()
project.layout.buildDirectory.get().asFile.deleteRecursively()
}

@Test
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 1 addition & 1 deletion info/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 618daed

Please sign in to comment.