Skip to content

Commit

Permalink
Version and style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wmdietl committed Jan 8, 2025
1 parent 1ebf7f6 commit 9c5040c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
29 changes: 14 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
// Code formatting; defines targets "spotlessApply" and "spotlessCheck".
// https://github.com/diffplug/spotless/tags ; see tags starting "gradle/"
// Only works on JDK 11+.
classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.25.0'
classpath 'com.diffplug.spotless:spotless-plugin-gradle:7.0.1'
}
}
}
Expand All @@ -16,17 +16,17 @@ plugins {
id 'com.gradleup.shadow' version '8.3.5'

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

// Checker Framework pluggable type-checking
id 'org.checkerframework' version '0.6.48'
id 'org.checkerframework' version '0.6.48' apply false
}

repositories {
gradlePluginPortal()
mavenLocal()
mavenCentral()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' }
}

ext {
Expand Down Expand Up @@ -79,7 +79,7 @@ if (isJava11orHigher) {

// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces(2)
leadingTabsToSpaces(2)
endWithNewline()
}
java {
Expand All @@ -90,7 +90,7 @@ if (isJava11orHigher) {
groovyGradle {
target '**/*.gradle'
greclipse() // which formatter Spotless should use to format .gradle files.
indentWithSpaces(2)
leadingTabsToSpaces(2)
trimTrailingWhitespace()
// endWithNewline() // Don't want to end empty files with a newline
}
Expand All @@ -107,7 +107,6 @@ tasks.withType(JavaCompile).configureEach {
if (isJava21orHigher) {
options.compilerArgs << '-Xlint:-this-escape'
}
options.errorprone.enabled = isJava11orHigher
options.errorprone {
// ExtendsObject does not yet exist in Error Prone 2.10.0.
// disable('ExtendsObject') // Incorrect when using the Checker Framework
Expand All @@ -120,13 +119,15 @@ tasks.withType(JavaCompile).configureEach {

// Checker Framework pluggable type-checking

apply plugin: 'org.checkerframework'

if (true) {
// Use the released version of the EISOP Checker Framework.
ext.checkerFrameworkVersion = '3.42.0-eisop4'
ext.checkerFrameworkVersion = '3.42.0-eisop5'
} else {
// To use a snapshot version of the EISOP Checker Framework.
// TODO: Change the above test to false to use a snapshot.
ext.checkerFrameworkVersion = '3.42.0-eisop4'
ext.checkerFrameworkVersion = '3.42.0-eisop5'
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'minutes'
}
Expand All @@ -135,6 +136,7 @@ if (true) {
dependencies {
compileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
testCompileOnly "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
checkerFramework "io.github.eisop:checker-qual:${checkerFrameworkVersion}"
checkerFramework "io.github.eisop:checker:${checkerFrameworkVersion}"
}

Expand All @@ -148,8 +150,6 @@ if (project.hasProperty('cfLocal')) {
}
}

apply plugin: 'org.checkerframework'

checkerFramework {
checkers = [
// No need to run CalledMethodsChecker, because ResourceLeakChecker does so.
Expand Down Expand Up @@ -194,7 +194,7 @@ javadoc {
check.dependsOn javadoc

task javadocWeb(type: Javadoc) {
description 'Upload API documentation to website.'
description = 'Upload API documentation to website.'
source = sourceSets.main.allJava
destinationDir = file("/cse/web/research/plumelib/${project.name}/api")
classpath = project.sourceSets.main.compileClasspath
Expand Down Expand Up @@ -234,15 +234,14 @@ javadocWeb.dependsOn requireJavadoc

/* Make Emacs TAGS table */
task tags(type: Exec) {
description 'Run etags to create an Emacs TAGS table'
description = 'Run etags to create an Emacs TAGS table'
commandLine 'bash', '-c', "find src/ -name '*.java' | sort | xargs etags"
}


// Debugging support

task printCompileClasspaths {
description 'Print the compile-time classpaths'
description = 'Print the compile-time classpaths'
doFirst {
println 'Compile classpath:'
println sourceSets.main.compileClasspath.asPath
Expand Down
12 changes: 6 additions & 6 deletions gradle/mavencentral.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
apply plugin: 'maven-publish'
apply plugin: 'signing'

group 'org.plumelib'
version '1.10.0'
group = 'org.plumelib'
version = '1.10.0'
ext {
packageName = 'plume-util'
}
Expand All @@ -71,12 +71,12 @@ publishing {
pom {
name = 'Plume Util'
description = 'Utility libraries for Java. Complements Guava, Apache Commons, Eclipse Collections, etc.'
url = "https://github.com/plume-lib/${packageName}"
url = "https://github.com/eisop-plume-lib/${packageName}"

scm {
connection = "scm:git:git@github.com:plume-lib/${packageName}.git"
developerConnection = "scm:git:git@github.com:plume-lib/${packageName}.git"
url = "git@github.com:plume-lib/${packageName}.git"
connection = "scm:git:git@github.com:eisop-plume-lib/${packageName}.git"
developerConnection = "scm:git:git@github.com:eisop-plume-lib/${packageName}.git"
url = "git@github.com:eisop-plume-lib/${packageName}.git"
}

licenses {
Expand Down

0 comments on commit 9c5040c

Please sign in to comment.