From 274b4aca62fce239fd8abfd43a27341f6c7f3a5c Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Thu, 2 Jan 2025 18:10:12 -0500 Subject: [PATCH] Fix gradle warnings --- .github/workflows/gradle-build.yml | 2 +- build.gradle | 7 +++---- templatefora-checker-qual/build.gradle | 6 +++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index be1e7f7..83d649c 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -22,4 +22,4 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.java }} - name: ./gradlew build javadoc - run: ./gradlew build + run: ./gradlew build javadoc diff --git a/build.gradle b/build.gradle index a4ac869..f65047e 100644 --- a/build.gradle +++ b/build.gradle @@ -18,8 +18,6 @@ ext.versions = [ checkerFramework: "3.48.2", ] - -sourceCompatibility = 1.8 def checkerframework_local = false // Set this variable to [true] while using local version of checker framework. dependencies { @@ -43,6 +41,7 @@ dependencies { } tasks.withType(JavaCompile).all { + sourceCompatibility = 1.8 options.compilerArgs.add("-Xlint:all") } @@ -87,7 +86,7 @@ test { testLogging { showStandardStreams = true // Show the found unexpected diagnostics and expected diagnostics not found. - exceptionFormat "full" + exceptionFormat = "full" events "failed" } } @@ -97,7 +96,7 @@ clean.doFirst { } task printClasspath { - description 'Prints the runtime classpath of the checker. ' + + description = 'Prints the runtime classpath of the checker. ' + 'When typechecking, put the output of this task on either the ' + 'processor path or the classpath of the project being type-checed.' doLast { diff --git a/templatefora-checker-qual/build.gradle b/templatefora-checker-qual/build.gradle index 7ffb341..918c8d9 100644 --- a/templatefora-checker-qual/build.gradle +++ b/templatefora-checker-qual/build.gradle @@ -23,7 +23,11 @@ task copySources(type: Copy) { include '**/org/checkerframework/checker/templatefora/qual/**' // Make files read only. - fileMode(0444) + filePermissions { + user.read = true + group.read = true + other.read = true + } into file('src/main/java') }