Skip to content

Commit

Permalink
Remove deprecated usage of buildDir (#3068)
Browse files Browse the repository at this point in the history
It's replaced with `layout.buildDirectory` in Gradle 8.3
  • Loading branch information
TWiStErRob committed Jul 21, 2023
1 parent cf8b820 commit 009be85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/java-publication.gradle
Expand Up @@ -99,7 +99,7 @@ publishing {
}

//useful for testing - running "publish" will create artifacts/pom in a local dir
repositories { maven { url = "$buildDir/repo" } }
repositories { maven { url = layout.buildDirectory.dir("repo") } }
}

plugins.withId("java") {
Expand Down
4 changes: 2 additions & 2 deletions gradle/mockito-core/javadoc.gradle
Expand Up @@ -9,7 +9,7 @@ javadoc {
// see https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html

source = sourceSets.main.allJava
destinationDir = file("$buildDir/javadoc")
destinationDir = layout.buildDirectory.dir("javadoc").get().asFile
title = "Mockito ${project.version} API"

// The way *gradle* javadoc task works and due to *gradle exclusion* the log output triggers javadoc warning and
Expand Down Expand Up @@ -57,7 +57,7 @@ javadoc {
doLast {
copy {
from "src/javadoc"
into "$buildDir/javadoc"
into layout.buildDirectory.dir("javadoc")
}
}
}
2 changes: 1 addition & 1 deletion gradle/retry-test.gradle
Expand Up @@ -45,7 +45,7 @@ test {
}
afterSuite { descriptor, result ->
if (!descriptor.parent) { //root
def failuresReport = new File(buildDir, name + "-failures.txt")
def failuresReport = layout.buildDirectory.file(name + "-failures.txt").get().asFile
def deletion = !failuresReport.exists() || failuresReport.delete()
if (!deletion) {
throw new GradleException("Problems deleting failures file: $reportPath. Please delete manually and retry.")
Expand Down

0 comments on commit 009be85

Please sign in to comment.