Migrate nullaway config to plugin (#3462)
This commit is contained in:
parent
c40bcc52fd
commit
3cfa086ffd
39
build.gradle
39
build.gradle
|
@ -2,19 +2,12 @@ import java.time.Duration
|
|||
import nebula.plugin.release.git.opinion.Strategies
|
||||
|
||||
plugins {
|
||||
id 'idea'
|
||||
id("idea")
|
||||
|
||||
id "io.github.gradle-nexus.publish-plugin"
|
||||
id "nebula.release"
|
||||
|
||||
id 'org.gradle.test-retry' apply false
|
||||
|
||||
id 'org.unbroken-dome.test-sets' apply false
|
||||
id 'com.github.ben-manes.versions'
|
||||
|
||||
id "com.diffplug.spotless"
|
||||
id "net.ltgt.errorprone" apply false
|
||||
id "net.ltgt.nullaway" apply false
|
||||
id("com.github.ben-manes.versions")
|
||||
id("com.diffplug.spotless")
|
||||
id("io.github.gradle-nexus.publish-plugin")
|
||||
id("nebula.release")
|
||||
}
|
||||
|
||||
release {
|
||||
|
@ -51,28 +44,6 @@ nexusPublishing {
|
|||
|
||||
description = 'OpenTelemetry instrumentations for Java'
|
||||
|
||||
allprojects {
|
||||
plugins.withId('net.ltgt.nullaway') {
|
||||
dependencies {
|
||||
errorprone "com.uber.nullaway:nullaway"
|
||||
}
|
||||
|
||||
nullaway {
|
||||
annotatedPackages.addAll("io.opentelemetry", "com.linecorp.armeria,com.google.common")
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
if (!name.toLowerCase().contains("test")) {
|
||||
options.errorprone {
|
||||
nullaway {
|
||||
severity = net.ltgt.gradle.errorprone.CheckSeverity.ERROR
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spotless {
|
||||
// this formatting is applied at the root level, as some of these files are not in a submodules
|
||||
// and would be missed otherwise
|
||||
|
|
|
@ -51,6 +51,7 @@ dependencies {
|
|||
// When updating, also update dependencyManagement/dependencyManagement.gradle.kts
|
||||
implementation("net.bytebuddy:byte-buddy-gradle-plugin:1.11.2")
|
||||
implementation("net.ltgt.gradle:gradle-errorprone-plugin:2.0.1")
|
||||
implementation("net.ltgt.gradle:gradle-nullaway-plugin:1.1.0")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
import net.ltgt.gradle.errorprone.CheckSeverity
|
||||
import net.ltgt.gradle.errorprone.errorprone
|
||||
import net.ltgt.gradle.nullaway.nullaway
|
||||
|
||||
plugins {
|
||||
id("net.ltgt.nullaway")
|
||||
|
||||
id("otel.errorprone-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
errorprone("com.uber.nullaway:nullaway")
|
||||
}
|
||||
|
||||
nullaway {
|
||||
annotatedPackages.addAll("io.opentelemetry", "com.linecorp.armeria,com.google.common")
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<JavaCompile>().configureEach {
|
||||
if (!name.toLowerCase().contains("test")) {
|
||||
options.errorprone.nullaway {
|
||||
severity.set(CheckSeverity.ERROR)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("otel.library-instrumentation")
|
||||
id("net.ltgt.nullaway")
|
||||
id("otel.nullaway-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("otel.library-instrumentation")
|
||||
id("net.ltgt.nullaway")
|
||||
id("otel.nullaway-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("otel.library-instrumentation")
|
||||
id("net.ltgt.nullaway")
|
||||
id("otel.nullaway-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id("otel.library-instrumentation")
|
||||
id("net.ltgt.nullaway")
|
||||
id("otel.nullaway-conventions")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -4,7 +4,6 @@ pluginManagement {
|
|||
id "com.github.jk1.dependency-license-report" version "1.16"
|
||||
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
|
||||
id "me.champeau.jmh" version "0.6.5"
|
||||
id "net.ltgt.nullaway" version "1.1.0"
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.5.10'
|
||||
id 'org.unbroken-dome.test-sets' version '4.0.0'
|
||||
id "org.xbib.gradle.plugin.jflex" version "1.5.0"
|
||||
|
|
Loading…
Reference in New Issue