Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ allprojects { currentProj ->
}

dependencies {
errorprone(libs.error.prone.core)
errorprone(rootProject.libs.error.prone.core)

allProjects(subprojects)
}
Expand Down Expand Up @@ -787,8 +787,8 @@ subprojects {

dependencies {
// TODO: it's a bug that annotatedlib:guava requires the error_prone_annotations dependency.
annotatedGuava(libs.error.prone.annotations)
annotatedGuava(libs.guava) {
annotatedGuava(rootProject.libs.error.prone.annotations)
annotatedGuava(rootProject.libs.guava) {
// So long as Guava only uses annotations from checker-qual, excluding it should not cause problems.
exclude group: "org.checkerframework"
}
Expand Down Expand Up @@ -856,7 +856,7 @@ subprojects {
// Tasks such as `checkInterning` and `checkResourceLeak` run various checkers on all the main source sets.
// These pass and are run by the `typecheck` task.
// When you add one here, also update a dependsOn item for the "typecheck" task.
createCheckTypeTask(project.name, "Formatter",
rootProject.createCheckTypeTask(project.name, "Formatter",
"org.checkerframework.checker.formatter.FormatterChecker")

def checkInterningArgs = [
Expand All @@ -872,32 +872,32 @@ subprojects {
}


createCheckTypeTask(project.name, "Interning",
rootProject.createCheckTypeTask(project.name, "Interning",
"org.checkerframework.checker.interning.InterningChecker",
checkInterningArgs)

createCheckTypeTask(project.name, "Optional",
rootProject.createCheckTypeTask(project.name, "Optional",
"org.checkerframework.checker.optional.OptionalChecker",
[
// to avoid having to annotate JavaParser
"-AassumePureGetters",
"-AassumeAssertionsAreEnabled",
])
createCheckTypeTask(project.name, "Purity",
rootProject.createCheckTypeTask(project.name, "Purity",
"org.checkerframework.framework.util.PurityChecker")
createCheckTypeTask(project.name, "Regex",
rootProject.createCheckTypeTask(project.name, "Regex",
"org.checkerframework.checker.regex.RegexChecker")
createCheckTypeTask(project.name, "ResourceLeak",
rootProject.createCheckTypeTask(project.name, "ResourceLeak",
"org.checkerframework.checker.resourceleak.ResourceLeakChecker")
createCheckTypeTask(project.name, "Signature",
rootProject.createCheckTypeTask(project.name, "Signature",
"org.checkerframework.checker.signature.SignatureChecker")

// The checkNullness task runs on all code, but it only *checks* the following code:
// * All files outside the "framework", "checker", and "annotation-file-utilities" subprojects.
// * In the "framework", "checker", and "annotation-file-utilities" subprojects, files with `@AnnotatedFor("nullness")`.
boolean nullnessAll = providers.gradleProperty("nullnessAll").isPresent()
if (!nullnessAll && (project.name.is("framework") || project.name.is("checker") || project.name.is("annotation-file-utilities"))) {
createCheckTypeTask(project.name, "Nullness",
rootProject.createCheckTypeTask(project.name, "Nullness",
"org.checkerframework.checker.nullness.NullnessChecker",
[
"-AskipUses=com\\.sun\\.*",
Expand All @@ -906,13 +906,13 @@ subprojects {
"-AuseConservativeDefaultsForUncheckedCode=source"
])
} else {
createCheckTypeTask(project.name, "Nullness",
rootProject.createCheckTypeTask(project.name, "Nullness",
"org.checkerframework.checker.nullness.NullnessChecker",
["-AskipUses=com\\.sun\\.*"])
}


createCheckTypeTask(project.name, "CompilerMessages",
rootProject.createCheckTypeTask(project.name, "CompilerMessages",
"org.checkerframework.checker.compilermsgs.CompilerMessagesChecker")
checkCompilerMessages {
doFirst {
Expand Down
2 changes: 1 addition & 1 deletion checker-util/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: rootProject.file("gradle-mvn-push.gradle")

/** Adds information to the publication for uploading to Maven repositories. */
final checkerUtilPom(publication) {
sharedPublicationConfiguration(publication)
rootProject.sharedPublicationConfiguration(publication)
publication.from(components.java)
publication.pom {
name = "Checker Util"
Expand Down
2 changes: 1 addition & 1 deletion checker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ apply from: rootProject.file("gradle-mvn-push.gradle")

/** Adds information to the publication for uploading to Maven repositories. */
final checkerPom(publication) {
sharedPublicationConfiguration(publication)
rootProject.sharedPublicationConfiguration(publication)
// Don't use publication.from(components.java) which would publish the skinny jar as checker.jar.
publication.pom {
name = "Checker Framework"
Expand Down
4 changes: 2 additions & 2 deletions dataflow/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ apply from: rootProject.file("gradle-mvn-push.gradle")

/** Adds information to the publication for uploading the dataflow artifacts to Maven repositories. */
final dataflowPom(publication) {
sharedPublicationConfiguration(publication)
rootProject.sharedPublicationConfiguration(publication)
publication.from(components.java)
// Information that is in all pom files is configured in checker-framework/gradle-mvn-push.gradle.
publication.pom {
Expand All @@ -198,7 +198,7 @@ final dataflowPom(publication) {
* @param shadedPkgName the name of the shaded package to use; also used as part of the artifact name: "dataflow-${shadePkgName}"
*/
final dataflowShadedPom(MavenPublication publication, String shadedPkgName) {
sharedPublicationConfiguration(publication)
rootProject.sharedPublicationConfiguration(publication)

publication.artifactId = "dataflow-${shadedPkgName}"
publication.pom {
Expand Down
2 changes: 1 addition & 1 deletion javacutil/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
apply from: rootProject.file("gradle-mvn-push.gradle")

final javacUtilPom(publication) {
sharedPublicationConfiguration(publication)
rootProject.sharedPublicationConfiguration(publication)
publication.from(components.java)

publication.pom {
Expand Down