Skip to content

Commit 186a6df

Browse files
committed
sync
1 parent d0c170c commit 186a6df

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

agent/agent/build.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,18 @@ tasks {
162162
delete(rootProject.file("licenses"))
163163
}
164164

165+
val generateLicenseReportEnabled =
166+
gradle.startParameter.taskNames.any { it.equals("generateLicenseReport") }
165167
named("generateLicenseReport").configure {
166168
dependsOn(cleanLicenses)
169+
finalizedBy(":spotlessApply")
170+
// disable licence report generation unless this task is explicitly run
171+
// the files produced by this task are used by other tasks without declaring them as dependency
172+
// which gradle considers an error
173+
enabled = enabled && generateLicenseReportEnabled
174+
}
175+
if (generateLicenseReportEnabled) {
176+
project.parent?.parent?.tasks?.getByName("spotlessMisc")?.dependsOn(named("generateLicenseReport"))
167177
}
168178
}
169179

licenses/more-licenses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# agent
33
## Dependency License Report
4-
_2025-07-21 03:47:53 UTC_
4+
_2025-07-21 13:02:04 PDT_
55
## Apache License, Version 2.0
66

77
**1** **Group:** `com.fasterxml.jackson.core` **Name:** `jackson-annotations` **Version:** `2.19.2`

0 commit comments

Comments
 (0)