Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move conformance test framework code into a subproject #108

Merged
merged 4 commits into from
Nov 15, 2023
Merged
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
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ dependencies {
testImplementation 'junit:junit:4.12'
// The jsr305 dep lets us use its annotations in some of the sample inputs we test against.
testImplementation 'com.google.code.findbugs:jsr305:3.0.2'
// The Guava dep lets us test our special handling of some Guava classes.
testImplementation 'com.google.guava:guava:31.1-jre'
testImplementation 'org.plumelib:plume-util:1.5.5'
testImplementation "org.checkerframework:framework-test:${cfVersion}"
testImplementation "com.google.truth:truth:1.1.3"
testImplementation project(":conformance")

errorproneJavac "com.google.errorprone:javac:9+181-r4173-1"
errorprone "com.google.errorprone:error_prone_core:2.18.0"
Expand Down
24 changes: 24 additions & 0 deletions conformance/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
plugins {
id 'java-library'
}

group 'org.jspecify'
version '0.1'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've liked the 0.0.0-SNAPSHOT pattern to simplify cross-project dependencies. Maybe that's not an issue, though, as long as everything involved uses Gradle and uses an include of our project? Then again, if that's the case, maybe we should be using an include for jspecify instead of a dependency on its 0.0.0-SNAPSHOT version? (Or maybe we should pick a "real" release of jspecify?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was doing what Gradle suggests for now. I think it's more work to set up a Maven artifact, which we will have to do later anyway.


repositories {
mavenCentral()
}

java {
sourceCompatibility = 1.9
netdpb marked this conversation as resolved.
Show resolved Hide resolved
}

dependencies {
api 'com.google.guava:guava:31.1-jre'
implementation "com.google.truth:truth:1.1.3"
implementation "org.jspecify:jspecify:0.0.0-SNAPSHOT"
}

test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
import java.nio.file.Path;
import java.util.Collection;
import java.util.Formatter;
import tests.ConformanceTest;
import tests.conformance.AbstractConformanceTest.ExpectedFact;
import tests.conformance.AbstractConformanceTest.Fact;
import tests.conformance.AbstractConformanceTest.ReportedFact;

/** Represents the results of running {@link ConformanceTest} on a set of files. */
/** Represents the results of running an {@link AbstractConformanceTest} on a set of files. */
public final class ConformanceTestReport {
/** An empty report. */
static final ConformanceTestReport EMPTY =
Expand Down
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Project name is read-only in build scripts, and defaults to directory name.
rootProject.name = "jspecify-reference-checker"
include 'conformance'

def initializeProject() {
exec {
Expand Down