From 16cc688c5dea029c32b24b46f3794a4bc9a33ea2 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Mon, 6 Jan 2025 18:04:22 -0500 Subject: [PATCH 1/4] Use createCloneTask for templatetest and demotest --- checker/build.gradle | 46 ++------------------------------------------ 1 file changed, 2 insertions(+), 44 deletions(-) diff --git a/checker/build.gradle b/checker/build.gradle index caedf1412ce..44fbe8f6611 100644 --- a/checker/build.gradle +++ b/checker/build.gradle @@ -328,28 +328,7 @@ task demosTests(dependsOn: assembleForJavac, group: 'Verification') { doLast { File demosDir = new File(projectDir, '../../checker-framework.demos'); - if (!demosDir.exists()) { - injected.execOps.exec { - workingDir file(demosDir.toString() + '/../') - executable 'git' - args = [ - 'clone', - '--depth', - '1', - 'https://github.com/eisop/checker-framework.demos.git' - ] - } - } else { - injected.execOps.exec { - workingDir demosDir - executable 'git' - args = [ - 'pull', - 'https://github.com/eisop/checker-framework.demos.git' - ] - ignoreExitValue = true - } - } + createCloneTask('gettemplatefora-checker', 'https://github.com/eisop/checker-framework.demos.git', templateforCheckerDir) ant.properties.put('checker.lib', file("${projectDir}/dist/checker.jar").absolutePath) ant.ant(dir: demosDir.toString()) } @@ -362,28 +341,7 @@ task templateTests(dependsOn: assembleForJavac, group: 'Verification') { doLast { File templateforCheckerDir = new File(projectDir, '../../templatefora-checker'); - if (!templateforCheckerDir.exists()) { - injected.execOps.exec { - workingDir file(templateforCheckerDir.toString() + '/../') - executable 'git' - args = [ - 'clone', - '--depth', - '1', - 'https://github.com/eisop/templatefora-checker.git' - ] - } - } else { - injected.execOps.exec { - workingDir templateforCheckerDir - executable 'git' - args = [ - 'pull', - 'https://github.com/eisop/templatefora-checker.git' - ] - ignoreExitValue = true - } - } + createCloneTask('gettemplatefora-checker', 'https://github.com/eisop/templatefora-checker.git', templateforCheckerDir) println "Running Gradle build in $templateforCheckerDir" injected.execOps.exec { workingDir = templateforCheckerDir From 9d2bcdc14df9b0838c3245f305696e1336fb577f Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Mon, 6 Jan 2025 18:05:25 -0500 Subject: [PATCH 2/4] Update CHANGELOG --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 43c0d06238a..ea7071aa8c8 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,7 +7,7 @@ Version 3.42.0-eisop6 (January ??, 2025) **Closed issues:** -eisop#1003, eisop#1033. +eisop#1003, eisop#1033, eisop#1051. Version 3.42.0-eisop5 (December 20, 2024) From 07c8377546de4f7dd139baaa6b22a9b35b0d7734 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Mon, 6 Jan 2025 18:23:14 -0500 Subject: [PATCH 3/4] Typo --- checker/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checker/build.gradle b/checker/build.gradle index 44fbe8f6611..03876d2a4c4 100644 --- a/checker/build.gradle +++ b/checker/build.gradle @@ -328,7 +328,7 @@ task demosTests(dependsOn: assembleForJavac, group: 'Verification') { doLast { File demosDir = new File(projectDir, '../../checker-framework.demos'); - createCloneTask('gettemplatefora-checker', 'https://github.com/eisop/checker-framework.demos.git', templateforCheckerDir) + createCloneTask('getDemos', 'https://github.com/eisop/checker-framework.demos.git', demosDir) ant.properties.put('checker.lib', file("${projectDir}/dist/checker.jar").absolutePath) ant.ant(dir: demosDir.toString()) } @@ -341,7 +341,7 @@ task templateTests(dependsOn: assembleForJavac, group: 'Verification') { doLast { File templateforCheckerDir = new File(projectDir, '../../templatefora-checker'); - createCloneTask('gettemplatefora-checker', 'https://github.com/eisop/templatefora-checker.git', templateforCheckerDir) + createCloneTask('getTemplatefora-checker', 'https://github.com/eisop/templatefora-checker.git', templateforCheckerDir) println "Running Gradle build in $templateforCheckerDir" injected.execOps.exec { workingDir = templateforCheckerDir From 725d331d300f322c60a0417b2fdfe05f6def6a01 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Tue, 7 Jan 2025 17:10:22 -0500 Subject: [PATCH 4/4] Fixes the tasks --- build.gradle | 5 ++++- checker/build.gradle | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 73a9d578bd3..26921e81815 100644 --- a/build.gradle +++ b/build.gradle @@ -66,6 +66,8 @@ ext { plumeScriptsHome = "${project(':checker').projectDir}/bin-devel/.plume-scripts" htmlToolsHome = "${project(':checker').projectDir}/bin-devel/.html-tools" doLikeJavacHome = "${project(':checker').projectDir}/bin/.do-like-javac" + templateforCheckerDir = "${parentDir}/templatefora-checker" + demosDir = "${parentDir}/checker-framework.demos" javadocMemberLevel = JavadocMemberLevel.PROTECTED @@ -865,7 +867,8 @@ createCloneTask('getGitScripts', 'https://github.com/eisop-plume-lib/git-scripts createCloneTask('getPlumeScripts', 'https://github.com/eisop-plume-lib/plume-scripts.git', plumeScriptsHome) createCloneTask('getHtmlTools', 'https://github.com/plume-lib/html-tools.git', htmlToolsHome) createCloneTask('getDoLikeJavac', 'https://github.com/opprop/do-like-javac.git', doLikeJavacHome) - +createCloneTask('getTemplatefora-checker', 'https://github.com/eisop/templatefora-checker.git', templateforCheckerDir) +createCloneTask('getDemos', 'https://github.com/eisop/checker-framework.demos.git', demosDir) // No group so it does not show up in the output of `gradlew tasks` task pythonIsInstalled(type: Exec) { diff --git a/checker/build.gradle b/checker/build.gradle index 03876d2a4c4..e32fdb91ede 100644 --- a/checker/build.gradle +++ b/checker/build.gradle @@ -327,8 +327,10 @@ task demosTests(dependsOn: assembleForJavac, group: 'Verification') { def injected = project.objects.newInstance(InjectedExecOps) doLast { - File demosDir = new File(projectDir, '../../checker-framework.demos'); - createCloneTask('getDemos', 'https://github.com/eisop/checker-framework.demos.git', demosDir) + injected.execOps.exec { + workingDir = rootDir + commandLine "./gradlew", "getDemos" + } ant.properties.put('checker.lib', file("${projectDir}/dist/checker.jar").absolutePath) ant.ant(dir: demosDir.toString()) } @@ -340,8 +342,10 @@ task templateTests(dependsOn: assembleForJavac, group: 'Verification') { def injected = project.objects.newInstance(InjectedExecOps) doLast { - File templateforCheckerDir = new File(projectDir, '../../templatefora-checker'); - createCloneTask('getTemplatefora-checker', 'https://github.com/eisop/templatefora-checker.git', templateforCheckerDir) + injected.execOps.exec { + workingDir = rootDir + commandLine "./gradlew", "getTemplatefora-checker" + } println "Running Gradle build in $templateforCheckerDir" injected.execOps.exec { workingDir = templateforCheckerDir