Skip to content

Commit

Permalink
Updates for typetools/checker-framework 3.39.0 release (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl authored Oct 21, 2023
2 parents ad6c78c + fb011cc commit 15a290d
Show file tree
Hide file tree
Showing 17 changed files with 126 additions and 144 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":automergeAll",
":automergeRequireAllStatusChecks",
"schedule:nonOfficeHours",
":disableDependencyDashboard"
],
"timezone": "America/Los_Angeles"
}
8 changes: 4 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ jobs:

strategy:
matrix:
java: [ '8', '11', '17', '19' ]
java: [ '11', '17', '21' ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: ./gradlew build javadoc
run: ./gradlew build
- name: ./gradlew requireJavadoc
run: ./gradlew requireJavadoc
- name: ./gradlew spotlessCheck
run: ./gradlew spotlessCheck
if: matrix.java != '8'
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cache:
- $HOME/.m2/

jdk:
- oraclejdk8
- oraclejdk17

# Add "verGJF" task when google-java-format handles type annotations better;
# see https://github.com/google/google-java-format/issues/5
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# BCEL-Util change log

## 1.3.0 (Sep ??, 2023)

- No longer runs under Java 8. Use Java 11 or later.

## 1.2.2 (May 15, 2022)

- Tested under Java 20
- No longer compiles under Java 8, but still runs under Java 8.

## 1.2.1 (December 13, 2022)

Removed deprecated methods:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ In a Gradle buildfile, write

```
dependencies {
implementation 'org.plumelib:bcel-util:1.2.1'
implementation 'org.plumelib:bcel-util:1.2.2'
}
```

Other build systems are [similar](https://search.maven.org/artifact/org.plumelib/bcel-util/1.2.1/jar).
Other build systems are [similar](https://search.maven.org/artifact/org.plumelib/bcel-util/1.2.2/jar).
82 changes: 37 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ plugins {
id 'java-library'

// To create a fat jar build/libs/...-all.jar, run: ./gradlew shadowJar
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'

// Code formatting; defines targets "spotlessApply" and "spotlessCheck"
// Requires JDK 11 or higher.
id 'com.diffplug.spotless' version '6.14.0' apply false
// Requires JDK 11 or higher; the plugin crashes under JDK 8.
id 'com.diffplug.spotless' version '6.22.0'

// Error Prone linter
id('net.ltgt.errorprone') version '3.0.1'
id('net.ltgt.errorprone') version '3.1.0'

// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.23'
id 'org.checkerframework' version '0.6.34'

// To show task list as a tree, run: ./gradlew <taskname> taskTree
id 'com.dorongold.task-tree' version '2.1.1'
Expand All @@ -22,25 +22,25 @@ repositories {
mavenCentral()
}

ext.errorproneVersion = '2.18.0'
ext.errorproneVersion = '2.23.0'

dependencies {
api 'org.checkerframework.annotatedlib:bcel:6.5.0'
// For a locally-built commons-bcel, set $BCEL and use this line instead of the above.
// implementation fileTree(dir: "$System.env.BCEL/target", include: 'bcel-6.2.0.2.jar')

// implementation "com.google.errorprone:error_prone_core:${errorproneVersion}" // For @InlineMe.
implementation 'org.plumelib:reflection-util:1.0.6'
implementation 'org.plumelib:reflection-util:1.1.0'

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
}

// To upload to Maven Central, see instructions in the file.
apply from: "${buildscript.sourceFile.parent}/gradle/mavencentral.gradle"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 11
targetCompatibility = 11

test {
useJUnitPlatform {
Expand All @@ -49,31 +49,27 @@ test {
}
}

ext.isJava11orHigher = JavaVersion.current() >= JavaVersion.VERSION_11
if (isJava11orHigher) {
apply plugin: 'com.diffplug.spotless'
spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
spotless {
format 'misc', {
// define the files to apply `misc` to
target '*.md', '.gitignore'

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
java {
targetExclude('**/WeakIdentityHashMap.java')
googleJavaFormat()
formatAnnotations()
}
groovyGradle {
target '**/*.gradle'
greclipse() // which formatter Spotless should use to format .gradle files.
indentWithSpaces(2)
trimTrailingWhitespace()
// endWithNewline() // Don't want to end empty files with a newline
}
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
java {
targetExclude('**/WeakIdentityHashMap.java')
googleJavaFormat()
formatAnnotations()
}
groovyGradle {
target '**/*.gradle'
greclipse() // which formatter Spotless should use to format .gradle files.
indentWithSpaces(2)
trimTrailingWhitespace()
// endWithNewline() // Don't want to end empty files with a newline
}
}

Expand All @@ -86,7 +82,6 @@ tasks.withType(JavaCompile).configureEach {
// "-processing" avoids javac warning "No processor claimed any of these annotations".
options.compilerArgs << '-Xlint:all,-processing' << '-Werror'
options.errorprone {
enabled = JavaVersion.current() != JavaVersion.VERSION_1_8
disable('ReferenceEquality') // Use Interning Checker instead.
// Code copied from BCEL that we don't want to change gratuitously.
excludedPaths = '.*/org/plumelib/bcelutil/StackVer.java'
Expand All @@ -98,9 +93,9 @@ tasks.withType(JavaCompile).configureEach {
apply plugin: 'org.checkerframework'

dependencies {
compileOnly 'io.github.eisop:checker-qual:3.28.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.28.0-eisop1'
checkerFramework 'io.github.eisop:checker:3.28.0-eisop1'
compileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
testCompileOnly 'io.github.eisop:checker-qual:3.34.0-eisop1'
checkerFramework 'io.github.eisop:checker:3.34.0-eisop1'
}

checkerFramework {
Expand All @@ -122,6 +117,7 @@ checkerFramework {
'-Werror',
'-AcheckPurityAnnotations',
'-ArequirePrefixInWarningSuppressions',
'-AwarnRedundantAnnotations',
'-AwarnUnneededSuppressions',
'-AnoJreVersionCheck',
]
Expand Down Expand Up @@ -155,13 +151,11 @@ javadoc {
// See https://bugs.openjdk.org/browse/JDK-8274639
// JDK 18 has a "--link-modularity-mismatch" command-line option which is "info" or "warn".
// I think it would work to:
// * use JDK 8 links under JDK <= 17.
// * use JDK 11 links under JDK <= 17.
// * use JDK 17 links, and "--link-modularity-mismatch info", under JDK > 17 (i.e., JDK >= 18).
// But it's easier to just not use "linksOffline".
}
if (JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
options.addStringOption('source', '8')
}
options.addStringOption('source', '11')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
Expand All @@ -176,9 +170,7 @@ task javadocWeb(type: Javadoc) {
source = sourceSets.main.allJava
destinationDir = file("/cse/web/research/plumelib/${project.name}/api")
classpath = project.sourceSets.main.compileClasspath
if (JavaVersion.current().compareTo(org.gradle.api.JavaVersion.VERSION_1_9) >= 0) {
options.addStringOption('source', '8')
}
options.addStringOption('source', '11')
doLast {
ant.replaceregexp(match:"@import url\\('resources/fonts/dejavu.css'\\);\\s*", replace:'',
flags:'g', byline:true) {
Expand Down
40 changes: 0 additions & 40 deletions gradle/codeformatting.gradle

This file was deleted.

16 changes: 11 additions & 5 deletions gradle/mavencentral.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@

// To make a release (run on any filesystem, except the last step):
// * git pull
// * In ../build.gradle, ensure that "To use a snapshot version" is not enabled.
// * Update the version number in ../README.md and in this file (multiple times in each).
// Ensure the version number in this file does not contain "-SNAPSHOT".
// * Update ../CHANGELOG.md .
// * Save files and stage changes.
// * Run in the top-level directory: ./gradlew clean publish
// * Browse to https://oss.sonatype.org/#stagingRepositories, complete the Maven Central release.
// * Add a git tag:
// VER=1.2.1 && git commit -m "Version $VER" && git push && git tag -a v$VER -m "Version $VER" && git push && git push --tags
// * Make a GitHub release. Go to the GitHub releases page, make a release, call it "bcel-util 1.2.1", use the text from ../CHANGELOG.md as the description, attach the .jar file from ../build/libs/
// VER=1.2.2 && git commit -m "Version $VER" && git push && git tag -a v$VER -m "Version $VER" && git push && git push --tags
// * Make a GitHub release. Go to the GitHub releases page, make a release, call it "bcel-util 1.2.2", use the text from ../CHANGELOG.md as the description, attach the .jar and -all.jar files from ../build/libs/ .
// * Finally, run on the CSE filesystem: git pull && ./gradlew javadocWeb

apply plugin: 'maven-publish'
apply plugin: 'signing'

group 'org.plumelib'
version '1.2.1'
version '1.2.2'

final isSnapshot = version.contains('SNAPSHOT')

Expand All @@ -38,7 +40,7 @@ publishing {

from components.java
pom {
name = 'Plume-lib Bcel-Util'
name = 'BCEL Util'
description = 'Utility functions for BCEL.'
url = 'https://github.com/plume-lib/bcel-util'

Expand Down Expand Up @@ -88,4 +90,8 @@ signing {
sign publishing.publications.maven
}

tasks.withType(Sign).configureEach { onlyIf { !isSnapshot } }
tasks.withType(Sign).configureEach {
onlyIf {
!isSnapshot
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 15a290d

Please sign in to comment.