Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 8.3 compatibility: buildDir -> layout.buildDirectory #3068

Merged
merged 1 commit into from Jul 21, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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