Skip to content

Commit ec143c4

Browse files
authored
Disable module metadata for all release artifacts (#3836)
1 parent 56b59b8 commit ec143c4

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

agent/agent/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,6 @@ tasks {
165165
named("generateLicenseReport").configure {
166166
dependsOn(cleanLicenses)
167167
}
168-
169-
// Because we reconfigure publishing to only include the shadow jar, the Gradle metadata is not correct.
170-
// Since we are fully bundled and have no dependencies, Gradle metadata wouldn't provide any advantage over
171-
// the POM anyways so in practice we shouldn't be losing anything.
172-
withType<GenerateModuleMetadata>().configureEach {
173-
enabled = false
174-
}
175168
}
176169

177170
// Don't publish non-shadowed jar (shadowJar is in shadowRuntimeElements)

agent/runtime-attach/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,4 @@ tasks {
2424
attributes("Automatic-Module-Name" to "com.microsoft.applicationinsights.attach")
2525
}
2626
}
27-
28-
// disabling the publication of Gradle Module Metadata
29-
withType<GenerateModuleMetadata>().configureEach {
30-
enabled = false
31-
}
3227
}

buildSrc/src/main/kotlin/ai.java-conventions.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ tasks {
8989
isPreserveFileTimestamps = false
9090
isReproducibleFileOrder = true
9191
}
92+
93+
// disabling the publication of Gradle Module Metadata
94+
// Because we reconfigure publishing to only include the shadow jar, the Gradle metadata is not correct.
95+
// Since we are fully bundled and have no dependencies, Gradle metadata wouldn't provide any advantage over
96+
// the POM anyways so in practice we shouldn't be losing anything.
97+
withType<GenerateModuleMetadata>().configureEach {
98+
enabled = false
99+
}
92100
}
93101

94102
normalization {

0 commit comments

Comments
 (0)