Skip to content

Commit

Permalink
build(gradle): use layout.buildDirectory instead of deprecated buildDir
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Jan 20, 2024
1 parent d1cb6af commit 477bf45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ subprojects {

enabled = subprojects.isEmpty() && !srcDirs.isEmpty()

ext.outputDir = file("$buildDir/delombok")
ext.outputDir = file("$layout.buildDirectory/delombok")
outputs.dir(outputDir)
srcDirs.each {
inputs.dir(it)
Expand All @@ -296,7 +296,7 @@ subprojects {
reportLevel = Confidence.LOW
ignoreFailures = false
excludeFilter = rootProject.file('./spotbugs-exclude.xml')
reportsDir = rootProject.file("$rootProject.buildDir/reports/spotbugs/$project.name")
reportsDir = rootProject.file("$rootProject.layout.buildDirectory/reports/spotbugs/$project.name")
}
tasks.withType(SpotBugsTask) {
onlyIf { gradle.taskGraph.hasTask('build') }
Expand All @@ -311,7 +311,7 @@ subprojects {
configFile = rootProject.file('./checkstyle.xml')
maxErrors = 0
ignoreFailures = false
reportsDir = rootProject.file("$rootProject.buildDir/reports/checkstyle/$project.name")
reportsDir = rootProject.file("$rootProject.layout.buildDirectory/reports/checkstyle/$project.name")
}
tasks.withType(Checkstyle) {
onlyIf { gradle.taskGraph.hasTask('build') }
Expand Down
4 changes: 2 additions & 2 deletions proto.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ sourceSets {
srcDir file('src/main/java')
}
java {
srcDir new File(buildDir, 'generated/source/proto/main/java')
srcDir new File(buildDir, 'generated/source/proto/main/grpc')
srcDir new File(layout.buildDirectory, 'generated/source/proto/main/java')
srcDir new File(layout.buildDirectory, 'generated/source/proto/main/grpc')
}
}
}
Expand Down

0 comments on commit 477bf45

Please sign in to comment.