Skip to content

Commit da63d85

Browse files
authored
Fix gradle build task (#288)
1 parent ae83ee4 commit da63d85

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

ddprof-lib/benchmarks/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ application {
1717

1818
// Include the main library headers
1919
tasks.withType(CppCompile).configureEach {
20-
dependsOn ':ddprof-lib:copyUpstreamFiles'
20+
dependsOn ':ddprof-lib:patchUpstreamFiles'
2121

2222
includes file('../src/main/cpp').toString()
2323
includes file('../src/main/cpp-external').toString()

ddprof-lib/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ def copyUpstreamFiles = tasks.register('copyUpstreamFiles', Copy) {
374374
into "${projectDir}/src/main/cpp-external"
375375
}
376376

377+
tasks.named("spotlessMisc") {
378+
configure {
379+
dependsOn patchUpstreamFiles
380+
}
381+
}
377382

378383
// Load patch configuration from external file
379384
apply from: "${rootDir}/gradle/patching.gradle"
@@ -530,6 +535,10 @@ configurations {
530535
// added by the cpp-library plugin
531536
tasks.whenTaskAdded { task ->
532537
if (task instanceof CppCompile) {
538+
configure {
539+
dependsOn patchUpstreamFiles
540+
}
541+
533542
if (!task.name.startsWith('compileLib') && task.name.contains('Release')) {
534543
buildConfigurations.each { config ->
535544
if (config.os == osIdentifier() && config.arch == archIdentifier()) {
@@ -810,4 +819,4 @@ tasks.withType(AbstractPublishToMaven).configureEach {
810819

811820
clean {
812821
delete "${projectDir}/src/main/cpp-external"
813-
}
822+
}

0 commit comments

Comments
 (0)