Skip to content

Commit 64e84df

Browse files
authored
Fix Gradle deprecation warnings
1 parent b7aea1e commit 64e84df

5 files changed

Lines changed: 93 additions & 93 deletions

File tree

build.gradle

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ plugins {
2020

2121
// There is another `repositories { ... }` block below; if you change this one, change that one as well.
2222
repositories {
23-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/'}
23+
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/'}
2424
mavenCentral()
2525
}
2626

@@ -77,7 +77,7 @@ task setLocalRepo(type:Exec) {
7777

7878
// No group so it does not show up in the output of `gradlew tasks`
7979
task installGitHooks(type: Copy, dependsOn: 'setLocalRepo') {
80-
description 'Copies git hooks to .git directory'
80+
description = 'Copies git hooks to .git directory'
8181
from files('checker/bin-devel/git.post-merge', 'checker/bin-devel/git.pre-commit')
8282
rename('git\\.(.*)', '$1')
8383
into localRepo + '/hooks'
@@ -120,7 +120,7 @@ allprojects { currentProj ->
120120
// * any new checkers have been added, or
121121
// * backward-incompatible changes have been made to APIs or elsewhere.
122122
// To make a snapshot release, version should end in "-SNAPSHOT", then: ./gradlew publish
123-
version '3.48.5-SNAPSHOT'
123+
version = '3.48.5-SNAPSHOT'
124124

125125
tasks.withType(JavaCompile).configureEach {
126126
options.fork = true
@@ -132,11 +132,11 @@ allprojects { currentProj ->
132132
apply plugin: 'de.undercouch.download'
133133
apply plugin: 'net.ltgt.errorprone'
134134

135-
group 'org.checkerframework'
135+
group = 'org.checkerframework'
136136

137137
// Keep in sync with "repositories { ... }" block above.
138138
repositories {
139-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/'}
139+
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/'}
140140
mavenCentral()
141141
}
142142

@@ -520,7 +520,7 @@ allprojects { currentProj ->
520520
} // end allProjects
521521

522522
task version(group: 'Documentation') {
523-
description 'Print Checker Framework version'
523+
description = 'Print Checker Framework version'
524524
doLast {
525525
println version
526526
}
@@ -537,8 +537,8 @@ task version(group: 'Documentation') {
537537
*/
538538
def createCheckTypeTask(projectName, taskName, checker, args = []) {
539539
project("${projectName}").tasks.create(name: "check${taskName}", type: JavaCompile, dependsOn: ':checker:shadowJar') {
540-
description "Run the ${taskName} Checker on the main sources."
541-
group 'Verification'
540+
description = "Run the ${taskName} Checker on the main sources."
541+
group = 'Verification'
542542
// Always run the task.
543543
outputs.upToDateWhen { false }
544544
source = project("${projectName}").sourceSets.main.java
@@ -568,7 +568,7 @@ def createCheckTypeTask(projectName, taskName, checker, args = []) {
568568
}
569569

570570
task htmlValidate(type: Exec, group: 'Format') {
571-
description 'Validate that HTML files are well-formed'
571+
description = 'Validate that HTML files are well-formed'
572572
executable 'html5validator'
573573
args = [
574574
'--ignore',
@@ -634,7 +634,7 @@ task allJavadoc(type: Javadoc, group: 'Documentation') {
634634
javadoc.dependsOn(allJavadoc)
635635

636636
task cleanManual(type: Exec) {
637-
description 'Clean the manual'
637+
description = 'Clean the manual'
638638
commandLine 'make', '-C', 'docs/manual', 'clean'
639639
}
640640
clean.dependsOn(cleanManual)
@@ -691,7 +691,7 @@ def createJavadocTask(taskName, taskDescription, memberLevel) {
691691
createJavadocTask('javadocDoclintAll', 'Runs javadoc with -Xdoclint:all option.', JavadocMemberLevel.PRIVATE)
692692

693693
task manual(type: Exec, group: 'Documentation') {
694-
description 'Build the manual'
694+
description = 'Build the manual'
695695
commandLine 'make', '-C', 'docs/manual', 'all'
696696
}
697697

@@ -721,7 +721,7 @@ tasks.register('getDoLikeJavac', CloneTask) {
721721

722722
// No group so it does not show up in the output of `gradlew tasks`
723723
task pythonIsInstalled(type: Exec) {
724-
description 'Check that the python3 executable is installed.'
724+
description = 'Check that the python3 executable is installed.'
725725
executable = 'python3'
726726
args '--version'
727727
}
@@ -732,7 +732,7 @@ task docTags(type: Exec, group: 'Emacs') {
732732

733733
task tags(type: Exec, group: 'Emacs') {
734734
dependsOn docTags
735-
description 'Create Emacs TAGS table'
735+
description = 'Create Emacs TAGS table'
736736
// running this task will also run the tags task in the subprojects, which is defined later in this file.
737737
commandLine 'etags', '-i', 'checker/TAGS', '-i', 'checker-qual/TAGS', '-i', 'checker-util/TAGS', '-i', 'dataflow/TAGS', '-i', 'framework/TAGS', '-i', 'framework-test/TAGS', '-i', 'javacutil/TAGS', '-i', 'docs/manual/TAGS'
738738
}
@@ -776,7 +776,7 @@ subprojects {
776776

777777
if (!project.name.startsWith('checker-qual-android')) {
778778
task tags(type: Exec) {
779-
description 'Create Emacs TAGS table'
779+
description = 'Create Emacs TAGS table'
780780
commandLine 'bash', '-c', "find . \\( -name build -o -name jtreg -o -name tests \\) -prune -o -name '*.java' -print | sort-directory-order | xargs ctags -e -f TAGS"
781781
}
782782
}
@@ -860,7 +860,7 @@ subprojects {
860860
// Add jtregTests to framework and checker modules
861861
if (project.name.is('framework') || project.name.is('checker')) {
862862
tasks.create(name: 'jtregTests', type: Exec, group: 'Verification') {
863-
description 'Run the jtreg tests. Requires jtreg to be installed.'
863+
description = 'Run the jtreg tests. Requires jtreg to be installed.'
864864
dependsOn('compileJava')
865865
dependsOn('compileTestJava')
866866
dependsOn('shadowJar')
@@ -918,7 +918,7 @@ subprojects {
918918
sourceSets.test.allJava.filter { it.path.contains('test/junit') }.forEach { file ->
919919
String junitClassName = file.name.replaceAll('.java', '')
920920
tasks.create(name: "${junitClassName}", type: Test) {
921-
description "Run ${junitClassName} tests."
921+
description = "Run ${junitClassName} tests."
922922
include "**/${name}.class"
923923
testClassesDirs = testing.suites.test.sources.output.classesDirs
924924
classpath = testing.suites.test.sources.runtimeClasspath
@@ -965,7 +965,7 @@ subprojects {
965965
outputs.upToDateWhen { false }
966966

967967
// Show the found unexpected diagnostics and expected diagnostics not found.
968-
exceptionFormat 'full'
968+
exceptionFormat = 'full'
969969
events 'failed'
970970

971971
// Don't show the uninteresting stack traces from the exceptions.
@@ -975,7 +975,7 @@ subprojects {
975975

976976
// Create a nonJunitTests task per project
977977
tasks.create(name: 'nonJunitTests', group: 'Verification') {
978-
description 'Run all Checker Framework tests except for the Junit tests and inference tests.'
978+
description = 'Run all Checker Framework tests except for the Junit tests and inference tests.'
979979
if (project.name.is('framework') || project.name.is('checker')) {
980980
dependsOn('jtregTests')
981981
}
@@ -994,19 +994,19 @@ subprojects {
994994

995995
// Create an inferenceTests task per project
996996
tasks.create(name: 'inferenceTests', group: 'Verification') {
997-
description 'Run inference tests.'
997+
description = 'Run inference tests.'
998998
if (project.name.is('checker')) {
999999
dependsOn('inferenceTests-part1', 'inferenceTests-part1')
10001000
}
10011001
}
10021002
tasks.create(name: 'inferenceTests-part1', group: 'Verification') {
1003-
description 'Run inference tests (part 1).'
1003+
description = 'Run inference tests (part 1).'
10041004
if (project.name.is('checker')) {
10051005
dependsOn('ainferTest', 'wpiManyTest')
10061006
}
10071007
}
10081008
tasks.create(name: 'inferenceTests-part2', group: 'Verification') {
1009-
description 'Run inference tests (part 2).'
1009+
description = 'Run inference tests (part 2).'
10101010
if (project.name.is('checker')) {
10111011
dependsOn('wpiPlumeLibTest')
10121012
}
@@ -1016,15 +1016,15 @@ subprojects {
10161016
// This isn't a test of the Checker Framework as the test and nonJunitTests tasks are.
10171017
// Tasks such as 'checkInterning' are constructed by createCheckTypeTask.
10181018
tasks.create(name: 'typecheck', group: 'Verification') {
1019-
description 'Run the Checker Framework on itself'
1019+
description = 'Run the Checker Framework on itself'
10201020
dependsOn('typecheck-part1', 'typecheck-part2')
10211021
}
10221022
tasks.create(name: 'typecheck-part1', group: 'Verification') {
1023-
description 'Run the Checker Framework on itself (part 1)'
1023+
description = 'Run the Checker Framework on itself (part 1)'
10241024
dependsOn('checkFormatter', 'checkInterning', 'checkOptional', 'checkPurity')
10251025
}
10261026
tasks.create(name: 'typecheck-part2', group: 'Verification') {
1027-
description 'Run the Checker Framework on itself (part 2)'
1027+
description = 'Run the Checker Framework on itself (part 2)'
10281028
dependsOn('checkResourceLeak', 'checkSignature')
10291029
if (project.name.is('framework') || project.name.is('checker')) {
10301030
dependsOn('checkCompilerMessages')
@@ -1036,7 +1036,7 @@ subprojects {
10361036
// Create an allTests task per project.
10371037
// allTests = test + nonJunitTests + inferenceTests + typecheck
10381038
tasks.create(name: 'allTests', group: 'Verification') {
1039-
description 'Run all Checker Framework tests'
1039+
description = 'Run all Checker Framework tests'
10401040
// The 'test' target is just the JUnit tests.
10411041
dependsOn('test', 'nonJunitTests', 'inferenceTests', 'typecheck')
10421042
}
@@ -1062,7 +1062,7 @@ assemble.dependsOn(':checker:assembleForJavac')
10621062
assemble.mustRunAfter(clean)
10631063

10641064
task buildAll(group: 'Build') {
1065-
description 'Build all jar files, including source and javadoc jars'
1065+
description = 'Build all jar files, including source and javadoc jars'
10661066
dependsOn(allJavadoc)
10671067
subprojects { Project subproject ->
10681068
dependsOn("${subproject.name}:assemble")
@@ -1074,14 +1074,14 @@ task buildAll(group: 'Build') {
10741074
}
10751075

10761076
task releaseBuild(group: 'Build') {
1077-
description 'Cleans, then builds everything required for a release'
1077+
description = 'Cleans, then builds everything required for a release'
10781078
dependsOn(clean)
10791079
dependsOn(buildAll)
10801080
}
10811081

10821082
// No group so it does not show up in the output of `gradlew tasks`
10831083
task releaseAndTest {
1084-
description 'Build everything required for a release and run allTests'
1084+
description = 'Build everything required for a release and run allTests'
10851085
dependsOn(releaseBuild)
10861086
subprojects { Project subproject ->
10871087
dependsOn("${subproject.name}:allTests")

checker-qual-android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
evaluationDependsOn(':checker-qual')
22

33
task copySources(type: Copy) {
4-
description 'Copy checker-qual source to checker-qual-android'
4+
description = 'Copy checker-qual source to checker-qual-android'
55
includeEmptyDirs = false
66
doFirst {
77
// Delete the directory in case a previously copied file should no longer be in checker-qual

0 commit comments

Comments
 (0)