Skip to content

Commit

Permalink
Stop using Project.getBuildDir()
Browse files Browse the repository at this point in the history
This getter will likely be deprecated in Gradle 8.3.  Fortunately we
only had a few remaining uses of it, all easily modernized.
  • Loading branch information
liblit committed Aug 5, 2023
1 parent 1138313 commit 91ea288
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ tasks.named<Test>("test") {
outputs.upToDateWhen { false }
afterTest(
KotlinClosure2<TestDescriptor, TestResult, Unit>({ descriptor, result ->
File("${rootProject.buildDir}/time-trials.csv").let {
rootProject.layout.buildDirectory.file("time-trials.csv").get().asFile.let {
if (!it.exists()) {
it.appendText("trial,className,name,resultType,startTime,endTime\n")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ val mavenRepository =

repositories.maven {
name = "fakeRemote"
url = uri("file://${rootProject.buildDir}/maven-fake-remote-repository")
setUrl(rootProject.layout.buildDirectory.dir("maven-fake-remote-repository"))
}

configure<SigningExtension> {
Expand Down

0 comments on commit 91ea288

Please sign in to comment.