Bump spotless-plugin-gradle from 6.12.1 to 6.13.0 (#7591)
This commit is contained in:
parent
6741c95bb8
commit
dfb4a6239d
|
@ -3,7 +3,7 @@ charset = utf-8
|
|||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = false
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
||||
tab_width = 2
|
||||
ij_continuation_indent_size = 4
|
||||
|
|
|
@ -7,12 +7,26 @@ plugins {
|
|||
spotless {
|
||||
java {
|
||||
googleJavaFormat()
|
||||
licenseHeaderFile(rootProject.file("../buildscripts/spotless.license.java"), "(package|import|public)")
|
||||
licenseHeaderFile(
|
||||
rootProject.file("../buildscripts/spotless.license.java"),
|
||||
"(package|import|public)"
|
||||
)
|
||||
target("src/**/*.java")
|
||||
}
|
||||
kotlinGradle {
|
||||
// not sure why it's not using the indent settings from .editorconfig
|
||||
ktlint().editorConfigOverride(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
|
||||
ktlint().editorConfigOverride(mapOf(
|
||||
"indent_size" to "2",
|
||||
"continuation_indent_size" to "2",
|
||||
"max_line_length" to "160",
|
||||
"ktlint_standard_no-wildcard-imports" to "disabled",
|
||||
// ktlint does not break up long lines, it just fails on them
|
||||
"ktlint_standard_max-line-length" to "disabled",
|
||||
// ktlint makes it *very* hard to locate where this actually happened
|
||||
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
||||
// also very hard to find out where this happens
|
||||
"ktlint_standard_wrapping" to "disabled"
|
||||
))
|
||||
target("**/*.gradle.kts")
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +52,7 @@ dependencies {
|
|||
implementation("org.apache.maven:maven-aether-provider:3.3.9")
|
||||
|
||||
// When updating, update above in plugins too
|
||||
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.12.1")
|
||||
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.13.0")
|
||||
implementation("com.google.guava:guava:31.1-jre")
|
||||
implementation("gradle.plugin.com.google.protobuf:protobuf-gradle-plugin:0.8.18")
|
||||
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
|
||||
|
|
|
@ -34,13 +34,13 @@ extra["testLatestDeps"] = testLatestDeps
|
|||
abstract class TestLatestDepsRule : ComponentMetadataRule {
|
||||
override fun execute(context: ComponentMetadataContext) {
|
||||
val version = context.details.id.version
|
||||
if (version.contains("-alpha", true)
|
||||
|| version.contains("-beta", true)
|
||||
|| version.contains("-rc", true)
|
||||
|| version.contains("-m", true) // e.g. spring milestones are published to grails repo
|
||||
|| version.contains(".alpha", true) // e.g. netty
|
||||
|| version.contains(".beta", true) // e.g. hibernate
|
||||
|| version.contains(".cr", true) // e.g. hibernate
|
||||
if (version.contains("-alpha", true) ||
|
||||
version.contains("-beta", true) ||
|
||||
version.contains("-rc", true) ||
|
||||
version.contains("-m", true) || // e.g. spring milestones are published to grails repo
|
||||
version.contains(".alpha", true) || // e.g. netty
|
||||
version.contains(".beta", true) || // e.g. hibernate
|
||||
version.contains(".cr", true) // e.g. hibernate
|
||||
) {
|
||||
context.details.status = "milestone"
|
||||
}
|
||||
|
|
|
@ -31,7 +31,9 @@ val DEFAULT_JAVA_VERSION = JavaVersion.VERSION_17
|
|||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(otelJava.minJavaVersionSupported.map { JavaLanguageVersion.of(Math.max(it.majorVersion.toInt(), DEFAULT_JAVA_VERSION.majorVersion.toInt())) })
|
||||
languageVersion.set(
|
||||
otelJava.minJavaVersionSupported.map { JavaLanguageVersion.of(Math.max(it.majorVersion.toInt(), DEFAULT_JAVA_VERSION.majorVersion.toInt())) }
|
||||
)
|
||||
}
|
||||
|
||||
// See https://docs.gradle.org/current/userguide/upgrading_version_5.html, Automatic target JVM version
|
||||
|
@ -150,7 +152,6 @@ testing {
|
|||
runtimeOnly("org.junit.vintage:junit-vintage-engine")
|
||||
implementation("org.junit-pioneer:junit-pioneer")
|
||||
|
||||
|
||||
implementation("org.assertj:assertj-core")
|
||||
implementation("org.awaitility:awaitility")
|
||||
implementation("org.mockito:mockito-core")
|
||||
|
@ -268,7 +269,9 @@ gradle.sharedServices.registerIfAbsent("testcontainersBuildService", Testcontain
|
|||
maxParallelUsages.convention(2)
|
||||
}
|
||||
|
||||
val resourceClassesCsv = listOf("Host", "Os", "Process", "ProcessRuntime").map { "io.opentelemetry.sdk.extension.resources.${it}ResourceProvider" }.joinToString(",")
|
||||
val resourceNames = listOf("Host", "Os", "Process", "ProcessRuntime")
|
||||
val resourceClassesCsv = resourceNames.joinToString(",") { "io.opentelemetry.sdk.extension.resources.${it}ResourceProvider" }
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
useJUnitPlatform()
|
||||
|
||||
|
@ -400,7 +403,9 @@ configurations.configureEach {
|
|||
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api")).using(project(":instrumentation-api"))
|
||||
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-semconv")).using(project(":instrumentation-api-semconv"))
|
||||
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations")).using(project(":instrumentation-annotations"))
|
||||
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations-support")).using(project(":instrumentation-annotations-support"))
|
||||
substitute(module("io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations-support")).using(
|
||||
project(":instrumentation-annotations-support")
|
||||
)
|
||||
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-bootstrap")).using(project(":javaagent-bootstrap"))
|
||||
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-extension-api")).using(project(":javaagent-extension-api"))
|
||||
substitute(module("io.opentelemetry.javaagent:opentelemetry-javaagent-tooling")).using(project(":javaagent-tooling"))
|
||||
|
|
|
@ -26,9 +26,9 @@ publishing {
|
|||
}
|
||||
artifactId = artifactPrefix(project, base.archivesName.get()) + base.archivesName.get()
|
||||
|
||||
if (groupId != "io.opentelemetry.instrumentation"
|
||||
&& groupId != "io.opentelemetry.javaagent"
|
||||
&& groupId != "io.opentelemetry.javaagent.instrumentation") {
|
||||
if (groupId != "io.opentelemetry.instrumentation" &&
|
||||
groupId != "io.opentelemetry.javaagent" &&
|
||||
groupId != "io.opentelemetry.javaagent.instrumentation") {
|
||||
throw GradleException("Unexpected groupId for this project or its parent ${project.parent}: $groupId")
|
||||
}
|
||||
|
||||
|
|
|
@ -7,33 +7,72 @@ plugins {
|
|||
spotless {
|
||||
java {
|
||||
googleJavaFormat()
|
||||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public|// Includes work from:)")
|
||||
licenseHeaderFile(
|
||||
rootProject.file("buildscripts/spotless.license.java"),
|
||||
"(package|import|public|// Includes work from:)"
|
||||
)
|
||||
toggleOffOn()
|
||||
target("src/**/*.java")
|
||||
}
|
||||
plugins.withId("groovy") {
|
||||
groovy {
|
||||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class)")
|
||||
licenseHeaderFile(
|
||||
rootProject.file("buildscripts/spotless.license.java"),
|
||||
"(package|import|class)"
|
||||
)
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
plugins.withId("scala") {
|
||||
scala {
|
||||
scalafmt()
|
||||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|public)")
|
||||
licenseHeaderFile(
|
||||
rootProject.file("buildscripts/spotless.license.java"),
|
||||
"(package|import|public)"
|
||||
)
|
||||
target("src/**/*.scala")
|
||||
}
|
||||
}
|
||||
plugins.withId("org.jetbrains.kotlin.jvm") {
|
||||
kotlin {
|
||||
// not sure why it's not using the indent settings from .editorconfig
|
||||
ktlint().editorConfigOverride(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports,package-name"))
|
||||
licenseHeaderFile(rootProject.file("buildscripts/spotless.license.java"), "(package|import|class|// Includes work from:)")
|
||||
ktlint().editorConfigOverride(
|
||||
mapOf(
|
||||
"indent_size" to "2",
|
||||
"continuation_indent_size" to "2",
|
||||
"max_line_length" to "160",
|
||||
"ktlint_standard_no-wildcard-imports" to "disabled",
|
||||
"ktlint_standard_package-name" to "disabled",
|
||||
// ktlint does not break up long lines, it just fails on them
|
||||
"ktlint_standard_max-line-length" to "disabled",
|
||||
// ktlint makes it *very* hard to locate where this actually happened
|
||||
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
||||
// also very hard to find out where this happens
|
||||
"ktlint_standard_wrapping" to "disabled"
|
||||
)
|
||||
)
|
||||
licenseHeaderFile(
|
||||
rootProject.file("buildscripts/spotless.license.java"),
|
||||
"(package|import|class|// Includes work from:)"
|
||||
)
|
||||
}
|
||||
}
|
||||
kotlinGradle {
|
||||
// not sure why it's not using the indent settings from .editorconfig
|
||||
ktlint().editorConfigOverride(mapOf("indent_size" to "2", "continuation_indent_size" to "2", "disabled_rules" to "no-wildcard-imports"))
|
||||
ktlint().editorConfigOverride(
|
||||
mapOf(
|
||||
"indent_size" to "2",
|
||||
"continuation_indent_size" to "2",
|
||||
"max_line_length" to "160",
|
||||
"ktlint_standard_no-wildcard-imports" to "disabled",
|
||||
// ktlint does not break up long lines, it just fails on them
|
||||
"ktlint_standard_max-line-length" to "disabled",
|
||||
// ktlint makes it *very* hard to locate where this actually happened
|
||||
"ktlint_standard_trailing-comma-on-call-site" to "disabled",
|
||||
// also very hard to find out where this happens
|
||||
"ktlint_standard_wrapping" to "disabled"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@ muzzle {
|
|||
sourceSets {
|
||||
main {
|
||||
val shadedDep = project(":instrumentation:azure-core:azure-core-1.14:library-instrumentation-shaded")
|
||||
output.dir(shadedDep.file("build/extracted/shadow"), "builtBy" to ":instrumentation:azure-core:azure-core-1.14:library-instrumentation-shaded:extractShadowJar")
|
||||
output.dir(
|
||||
shadedDep.file("build/extracted/shadow"),
|
||||
"builtBy" to ":instrumentation:azure-core:azure-core-1.14:library-instrumentation-shaded:extractShadowJar"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,10 @@ muzzle {
|
|||
sourceSets {
|
||||
main {
|
||||
val shadedDep = project(":instrumentation:azure-core:azure-core-1.19:library-instrumentation-shaded")
|
||||
output.dir(shadedDep.file("build/extracted/shadow"), "builtBy" to ":instrumentation:azure-core:azure-core-1.19:library-instrumentation-shaded:extractShadowJar")
|
||||
output.dir(
|
||||
shadedDep.file("build/extracted/shadow"),
|
||||
"builtBy" to ":instrumentation:azure-core:azure-core-1.19:library-instrumentation-shaded:extractShadowJar"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,10 @@ tasks {
|
|||
// including only tracing-opentelemetry excludes its transitive dependencies
|
||||
include(dependency("com.couchbase.client:tracing-opentelemetry"))
|
||||
}
|
||||
relocate("com.couchbase.client.tracing.opentelemetry", "io.opentelemetry.javaagent.instrumentation.couchbase.v3_1_6.shaded.com.couchbase.client.tracing.opentelemetry")
|
||||
relocate(
|
||||
"com.couchbase.client.tracing.opentelemetry",
|
||||
"io.opentelemetry.javaagent.instrumentation.couchbase.v3_1_6.shaded.com.couchbase.client.tracing.opentelemetry"
|
||||
)
|
||||
}
|
||||
|
||||
val extractShadowJar by registering(Copy::class) {
|
||||
|
|
|
@ -16,7 +16,10 @@ tasks {
|
|||
// including only tracing-opentelemetry excludes its transitive dependencies
|
||||
include(dependency("com.couchbase.client:tracing-opentelemetry"))
|
||||
}
|
||||
relocate("com.couchbase.client.tracing.opentelemetry", "io.opentelemetry.javaagent.instrumentation.couchbase.v3_1.shaded.com.couchbase.client.tracing.opentelemetry")
|
||||
relocate(
|
||||
"com.couchbase.client.tracing.opentelemetry",
|
||||
"io.opentelemetry.javaagent.instrumentation.couchbase.v3_1.shaded.com.couchbase.client.tracing.opentelemetry"
|
||||
)
|
||||
}
|
||||
|
||||
val extractShadowJar by registering(Copy::class) {
|
||||
|
|
|
@ -16,7 +16,10 @@ tasks {
|
|||
// including only tracing-opentelemetry excludes its transitive dependencies
|
||||
include(dependency("com.couchbase.client:tracing-opentelemetry"))
|
||||
}
|
||||
relocate("com.couchbase.client.tracing.opentelemetry", "io.opentelemetry.javaagent.instrumentation.couchbase.v3_2.shaded.com.couchbase.client.tracing.opentelemetry")
|
||||
relocate(
|
||||
"com.couchbase.client.tracing.opentelemetry",
|
||||
"io.opentelemetry.javaagent.instrumentation.couchbase.v3_2.shaded.com.couchbase.client.tracing.opentelemetry"
|
||||
)
|
||||
}
|
||||
|
||||
val extractShadowJar by registering(Copy::class) {
|
||||
|
|
|
@ -44,7 +44,9 @@ testing {
|
|||
|
||||
tasks {
|
||||
withType<Test>().configureEach {
|
||||
jvmArgs("-Dotel.instrumentation.executors.include=io.opentelemetry.javaagent.instrumentation.executors.ExecutorInstrumentationTest\$CustomThreadPoolExecutor")
|
||||
jvmArgs(
|
||||
"-Dotel.instrumentation.executors.include=io.opentelemetry.javaagent.instrumentation.executors.ExecutorInstrumentationTest\$CustomThreadPoolExecutor"
|
||||
)
|
||||
jvmArgs("-Djava.awt.headless=true")
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,10 @@ class KtorServerTracing private constructor(
|
|||
|
||||
internal val additionalExtractors = mutableListOf<AttributesExtractor<in ApplicationRequest, in ApplicationResponse>>()
|
||||
|
||||
internal val httpAttributesExtractorBuilder = HttpServerAttributesExtractor.builder(KtorHttpServerAttributesGetter.INSTANCE, KtorNetServerAttributesGetter())
|
||||
internal val httpAttributesExtractorBuilder = HttpServerAttributesExtractor.builder(
|
||||
KtorHttpServerAttributesGetter.INSTANCE,
|
||||
KtorNetServerAttributesGetter()
|
||||
)
|
||||
|
||||
internal var statusExtractor:
|
||||
(SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse> = { a -> a }
|
||||
|
@ -43,7 +46,9 @@ class KtorServerTracing private constructor(
|
|||
this.openTelemetry = openTelemetry
|
||||
}
|
||||
|
||||
fun setStatusExtractor(extractor: (SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse>) {
|
||||
fun setStatusExtractor(
|
||||
extractor: (SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse>
|
||||
) {
|
||||
this.statusExtractor = extractor
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,10 @@ class KtorServerTracing private constructor(
|
|||
|
||||
internal val additionalExtractors = mutableListOf<AttributesExtractor<in ApplicationRequest, in ApplicationResponse>>()
|
||||
|
||||
internal val httpAttributesExtractorBuilder = HttpServerAttributesExtractor.builder(KtorHttpServerAttributesGetter.INSTANCE, KtorNetServerAttributesGetter())
|
||||
internal val httpAttributesExtractorBuilder = HttpServerAttributesExtractor.builder(
|
||||
KtorHttpServerAttributesGetter.INSTANCE,
|
||||
KtorNetServerAttributesGetter()
|
||||
)
|
||||
|
||||
internal var statusExtractor:
|
||||
(SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse> = { a -> a }
|
||||
|
@ -43,7 +46,9 @@ class KtorServerTracing private constructor(
|
|||
this.openTelemetry = openTelemetry
|
||||
}
|
||||
|
||||
fun setStatusExtractor(extractor: (SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse>) {
|
||||
fun setStatusExtractor(
|
||||
extractor: (SpanStatusExtractor<ApplicationRequest, ApplicationResponse>) -> SpanStatusExtractor<in ApplicationRequest, in ApplicationResponse>
|
||||
) {
|
||||
this.statusExtractor = extractor
|
||||
}
|
||||
|
||||
|
|
|
@ -14,5 +14,7 @@ dependencies {
|
|||
}
|
||||
|
||||
tasks.withType<Test>().configureEach {
|
||||
jvmArgs("-Dotel.instrumentation.methods.include=io.opentelemetry.javaagent.instrumentation.methods.MethodTest\$ConfigTracedCallable[call];io.opentelemetry.javaagent.instrumentation.methods.MethodTest\$ConfigTracedCompletableFuture[getResult]")
|
||||
jvmArgs(
|
||||
"-Dotel.instrumentation.methods.include=io.opentelemetry.javaagent.instrumentation.methods.MethodTest\$ConfigTracedCallable[call];io.opentelemetry.javaagent.instrumentation.methods.MethodTest\$ConfigTracedCompletableFuture[getResult]"
|
||||
)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,14 @@ plugins {
|
|||
id("com.bmuschko.docker-remote-api")
|
||||
}
|
||||
|
||||
data class ImageTarget(val version: List<String>, val vm: List<String>, val jdk: List<String>, val args: Map<String, String> = emptyMap(), val war: String = "servlet-3.0", val windows: Boolean = true)
|
||||
data class ImageTarget(
|
||||
val version: List<String>,
|
||||
val vm: List<String>,
|
||||
val jdk: List<String>,
|
||||
val args: Map<String, String> = emptyMap(),
|
||||
val war: String = "servlet-3.0",
|
||||
val windows: Boolean = true
|
||||
)
|
||||
|
||||
val extraTag = findProperty("extraTag")
|
||||
?: java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(java.time.LocalDateTime.now())
|
||||
|
@ -112,7 +119,17 @@ tasks {
|
|||
}
|
||||
}
|
||||
|
||||
fun configureImage(parentTask: TaskProvider<out Task>, server: String, dockerfile: String, version: String, vm: String, jdk: String, warProject: String, args: Map<String, String>, isWindows: Boolean): String {
|
||||
fun configureImage(
|
||||
parentTask: TaskProvider<out Task>,
|
||||
server: String,
|
||||
dockerfile: String,
|
||||
version: String,
|
||||
vm: String,
|
||||
jdk: String,
|
||||
warProject: String,
|
||||
args: Map<String, String>,
|
||||
isWindows: Boolean
|
||||
): String {
|
||||
// Using separate build directory for different image
|
||||
val dockerWorkingDir = file("$buildDir/docker-$server-$version-jdk$jdk-$vm-$warProject")
|
||||
val dockerFileName = "$dockerfile.${if (isWindows) "windows." else ""}dockerfile"
|
||||
|
|
Loading…
Reference in New Issue