Skip to content

Commit

Permalink
Renaming and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
netdpb committed Nov 21, 2023
1 parent 6bb674f commit a636d06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
22 changes: 12 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ repositories {

configurations {
errorproneJavac
testAssertions {
conformanceTestAssertions {
attributes {
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, DocsType.SOURCES))
}
}
testDeps
conformanceTestDeps
}

ext {
Expand All @@ -43,17 +43,19 @@ dependencies {
testImplementation libs.checkerFramework.framework.test
testImplementation libs.guava
testImplementation libs.junit
testImplementation libs.jspecify.conformanceTest.framework
testImplementation libs.jspecify.conformanceTestFramework
testRuntimeOnly libs.jsr305 // jsr305 annotations are in some of the samples

testAssertions("org.jspecify.conformance:conformance-tests:0.0.0-SNAPSHOT") {
conformanceTestAssertions("org.jspecify.conformance:conformance-tests:0.0.0-SNAPSHOT") {
capabilities {
// Depend on the assertion sources
requireCapability "org.jspecify.conformance:conformance-tests-assertions"
}
}

testDeps("org.jspecify.conformance:conformance-tests:0.0.0-SNAPSHOT") {
conformanceTestDeps("org.jspecify.conformance:conformance-tests:0.0.0-SNAPSHOT") {
capabilities {
// Depend on the assertion dependencies
requireCapability "org.jspecify.conformance:conformance-tests-deps"
}
}
Expand Down Expand Up @@ -143,16 +145,16 @@ TaskProvider<Test> conformanceTest(String name, String testDirectory, String rep
}

tasks.register('unzipConformanceTestAssertions', Copy) {
dependsOn configurations.testAssertions
from zipTree(configurations.testAssertions.singleFile)
dependsOn configurations.conformanceTestAssertions
from zipTree(configurations.conformanceTestAssertions.singleFile)
exclude 'META-INF/'
into "${buildDir}/conformanceTests"
}

conformanceTest('conformanceTest', "${buildDir}/conformanceTests/org/jspecify/conformance/tests", 'tests/ConformanceTest-report.txt').configure {
dependsOn 'unzipConformanceTestAssertions', configurations.testDeps
inputs.files(configurations.testDeps)
systemProperty("JSpecifyConformanceTest.testDeps", configurations.testDeps.join(":"))
dependsOn 'unzipConformanceTestAssertions', configurations.conformanceTestDeps
inputs.files(configurations.conformanceTestDeps)
systemProperty("JSpecifyConformanceTest.testDeps", configurations.conformanceTestDeps.join(":"))
}

conformanceTest('conformanceTestOnSamples', "${jspecify.projectDir}/samples", 'tests/ConformanceTestOnSamples-report.txt')
Expand Down
5 changes: 2 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Project name is read-only in build scripts, and defaults to directory name.
rootProject.name = "jspecify-reference-checker"
include 'conformance-test-framework'
includeBuild(".")

// Lets the main build depend on the conformance subproject as org.jspecify:conformance.
// Lets the main build depend on the conformance subproject as org.jspecify:conformance-test-framework.
// See https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions
includeBuild(".")

Expand Down Expand Up @@ -39,7 +38,7 @@ dependencyResolutionManagement {
library("errorProne-javac", "com.google.errorprone:javac:9+181-r4173-1")
library("guava", "com.google.guava:guava:31.1-jre")
library("jspecify", "org.jspecify:jspecify:0.0.0-SNAPSHOT")
library("jspecify-conformanceTest-framework", "org.jspecify.conformance:conformance-test-framework:0.0.0-SNAPSHOT")
library("jspecify-conformanceTestFramework", "org.jspecify.conformance:conformance-test-framework:0.0.0-SNAPSHOT")
library("jsr305", "com.google.code.findbugs:jsr305:3.0.2")
library("junit", "junit:junit:4.12")
library("truth", "com.google.truth:truth:1.1.3")
Expand Down

0 comments on commit a636d06

Please sign in to comment.