Skip to content

Commit 12da48b

Browse files
committed
cleanup
1 parent 37392bd commit 12da48b

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

buildSrc/src/main/kotlin/io/opentelemetry/gradle/WeaverTasks.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ abstract class WeaverTasks @Inject constructor(
6060

6161
@TaskAction
6262
fun runWeaver() {
63-
// Validate Docker is available
6463
validateDockerAvailable()
6564

6665
val mounts = mutableListOf(

buildSrc/src/main/kotlin/otel.japicmp-conventions.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@ val latestReleasedVersion: String by lazy {
3030

3131
class AllowNewAbstractMethodOnAutovalueClasses : AbstractRecordingSeenMembers() {
3232
override fun maybeAddViolation(member: JApiCompatibility): Violation? {
33-
val allowableAutovalueChanges = setOf(
34-
JApiCompatibilityChangeType.METHOD_ABSTRACT_ADDED_TO_CLASS,
35-
JApiCompatibilityChangeType.METHOD_ADDED_TO_PUBLIC_CLASS,
36-
JApiCompatibilityChangeType.ANNOTATION_ADDED
37-
)
33+
val allowableAutovalueChanges = setOf(JApiCompatibilityChangeType.METHOD_ABSTRACT_ADDED_TO_CLASS,
34+
JApiCompatibilityChangeType.METHOD_ADDED_TO_PUBLIC_CLASS, JApiCompatibilityChangeType.ANNOTATION_ADDED)
3835
if (member.compatibilityChanges.filter { !allowableAutovalueChanges.contains(it.type) }.isEmpty() &&
39-
member is JApiMethod && isAutoValueClass(member.getjApiClass())) {
36+
member is JApiMethod && isAutoValueClass(member.getjApiClass()))
37+
{
4038
return Violation.accept(member, "Autovalue will automatically add implementation")
4139
}
4240
if (member.compatibilityChanges.isEmpty() &&
@@ -46,8 +44,10 @@ class AllowNewAbstractMethodOnAutovalueClasses : AbstractRecordingSeenMembers()
4644
return null
4745
}
4846

49-
fun isAutoValueClass(japiClass: JApiClass): Boolean = japiClass.newClass.get().getAnnotation(AutoValue::class.java) != null ||
50-
japiClass.newClass.get().getAnnotation(AutoValue.Builder::class.java) != null
47+
fun isAutoValueClass(japiClass: JApiClass): Boolean {
48+
return japiClass.newClass.get().getAnnotation(AutoValue::class.java) != null ||
49+
japiClass.newClass.get().getAnnotation(AutoValue.Builder::class.java) != null
50+
}
5151
}
5252

5353
class SourceIncompatibleRule : AbstractRecordingSeenMembers() {

buildSrc/src/main/kotlin/otel.weaver-conventions.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ if (hasWeaverModel) {
137137
}
138138
}
139139

140-
// Make spotless tasks depend on weaver generation
140+
// Make spotless tasks always run after the generate task
141141
tasks
142142
.matching {
143143
it.name == "spotlessJava" || it.name == "spotlessJavaApply" || it.name == "spotlessApply"

docs/weaver.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ Generates Java code, markdown documentation, and YAML configuration.
8686

8787
- Outputs to `src/main/java/{configured-package}/`
8888
- **Automatically formats** generated code with `spotlessJavaApply`
89-
- Runs before `compileJava` task
9089

9190
### Generate Documentation
9291

samplers/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ plugins {
55

66
description = "Sampler which makes its decision based on semantic attributes values"
77
otelJava.moduleName.set("io.opentelemetry.contrib.sampler")
8+
89
dependencies {
910
api("io.opentelemetry:opentelemetry-sdk")
1011

0 commit comments

Comments
 (0)