You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Goooler (via GitHub)" <gi...@apache.org> on 2024/01/26 08:13:33 UTC

[PR] Migrate deprecated buildDir [groovy]

Goooler opened a new pull request, #2043:
URL: https://github.com/apache/groovy/pull/2043

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "Goooler (via GitHub)" <gi...@apache.org>.
Goooler commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467364144


##########
build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle:
##########
@@ -126,7 +126,7 @@ asciidoctor.onlyIf { project.file('src/spec/doc').exists() }
 
 def asciidoctorAssets = tasks.register("asciidoctorAssets", Copy) {
     from project.fileTree('src/spec/doc/assets')
-    into "$buildDir/tmp/asciidoctor-assets"
+    into layout.buildDirectory.dir("tmp/asciidoc/html5/assets")

Review Comment:
   ```suggestion
       into layout.buildDirectory.dir("tmp/asciidoctor-assets")
   ```



##########
build.gradle:
##########
@@ -254,7 +254,7 @@ sonarqube {
         property "sonar.organization", "apache"
         property "sonar.host.url", "https://sonarcloud.io"
         property "sonar.cpd.exclusions", "**/*"
-//        property "sonar.coverage.jacoco.xmlReportPaths", "${rootProject.buildDir}/reports/jacoco/jacocoAllReport/jacocoAllReport.xml"
+//        property "sonar.coverage.jacoco.xmlReportPaths", layout.buildDirectory.dir("reports/jacoco/jacocoAllReport/jacocoAllReport.xml").get().asFile.absolutePath

Review Comment:
   ```suggestion
   //        property "sonar.coverage.jacoco.xmlReportPaths", layout.buildDirectory.file("reports/jacoco/jacocoAllReport/jacocoAllReport.xml").get().asFile.absolutePath
   ```



##########
build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle:
##########
@@ -53,14 +53,14 @@ asciidoctor {
     sources {
         include '*.adoc'
     }
-    outputDir = "$buildDir/asciidoc/html5"
+    outputDir = layout.buildDirectory.dir("asciidoc/html5")
     resources {
         duplicatesStrategy = DuplicatesStrategy.WARN
 
         from("${rootProject.projectDir}/src/spec/doc/assets") {
             include 'css/style.css'
         }
-        from("$buildDir/tmp/asciidoctor-assets")
+        from layout.buildDirectory.dir("asciidoc/html5/assets")

Review Comment:
   ```suggestion
           from layout.buildDirectory.dir("tmp/asciidoctor-assets")
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467377244


##########
build-logic/src/main/groovy/org.apache.groovy-performance.gradle:
##########
@@ -70,7 +70,7 @@ tasks.named('compileJmhGroovy') {
 
 tasks.register('displayJmhResults') {
     doLast {
-        println file("$buildDir/results/jmh/results.txt").text
+        println layout.buildDirectory.file("results/jmh/results.txt").get().asFile

Review Comment:
   This currently actually prints out the file, not the name as proposed, so the .text is still needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "Goooler (via GitHub)" <gi...@apache.org>.
Goooler merged PR #2043:
URL: https://github.com/apache/groovy/pull/2043


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467375986


##########
build-logic/src/main/groovy/org.apache.groovy-distribution.gradle:
##########
@@ -181,7 +181,7 @@ tasks.register('dist') {
 
 tasks.register("installGroovy", Sync) {
     duplicatesStrategy = DuplicatesStrategy.FAIL
-    def installDir = sharedConfiguration.installationDirectory.orElse(project.layout.buildDir.file("install"))
+    def installDir = sharedConfiguration.installationDirectory.orElse(layout.buildDirectory.file("install").get().asFile)

Review Comment:
   buildDirectory.file should probably be buildDirectory.dir here as well.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2043:
URL: https://github.com/apache/groovy/pull/2043#issuecomment-1911709539

   ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2043?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Comparison is base [(`4477e9c`)](https://app.codecov.io/gh/apache/groovy/commit/4477e9ce798ef327875ee9b4c8f9b15f6da15bc7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 68.5198% compared to head [(`5489efd`)](https://app.codecov.io/gh/apache/groovy/pull/2043?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 68.5261%.
   > Report is 4 commits behind head on master.
   
   > :exclamation: Current head 5489efd differs from pull request most recent head ef1f8c3. Consider uploading reports for the commit ef1f8c3 to get more accurate results
   
   <details><summary>Additional details and impacted files</summary>
   
   
   [![Impacted file tree graph](https://app.codecov.io/gh/apache/groovy/pull/2043/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)](https://app.codecov.io/gh/apache/groovy/pull/2043?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2043        +/-   ##
   ==================================================
   + Coverage     68.5198%   68.5261%   +0.0063%     
   - Complexity      29161      29165         +4     
   ==================================================
     Files            1422       1422                
     Lines          113484     113494        +10     
     Branches        19544      19546         +2     
   ==================================================
   + Hits            77759      77773        +14     
   + Misses          29182      29179         -3     
   + Partials         6543       6542         -1     
   ```
   
   
   [see 3 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2043/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "paulk-asert (via GitHub)" <gi...@apache.org>.
paulk-asert commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467357057


##########
build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle:
##########
@@ -53,14 +53,14 @@ asciidoctor {
     sources {
         include '*.adoc'
     }
-    outputDir = "$buildDir/asciidoc/html5"
+    outputDir = layout.buildDirectory.dir("asciidoc/html5")
     resources {
         duplicatesStrategy = DuplicatesStrategy.WARN
 
         from("${rootProject.projectDir}/src/spec/doc/assets") {
             include 'css/style.css'
         }
-        from("$buildDir/tmp/asciidoctor-assets")
+        from layout.buildDirectory.dir("asciidoc/html5/assets")

Review Comment:
   Should this be the same as the next change, i.e. with tmp in the path?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "Goooler (via GitHub)" <gi...@apache.org>.
Goooler commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467358053


##########
build-logic/src/main/groovy/org.apache.groovy-asciidoctor.gradle:
##########
@@ -53,14 +53,14 @@ asciidoctor {
     sources {
         include '*.adoc'
     }
-    outputDir = "$buildDir/asciidoc/html5"
+    outputDir = layout.buildDirectory.dir("asciidoc/html5")
     resources {
         duplicatesStrategy = DuplicatesStrategy.WARN
 
         from("${rootProject.projectDir}/src/spec/doc/assets") {
             include 'css/style.css'
         }
-        from("$buildDir/tmp/asciidoctor-assets")
+        from layout.buildDirectory.dir("asciidoc/html5/assets")

Review Comment:
   Ooops, typo here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Migrate deprecated buildDir [groovy]

Posted by "Goooler (via GitHub)" <gi...@apache.org>.
Goooler commented on code in PR #2043:
URL: https://github.com/apache/groovy/pull/2043#discussion_r1467378730


##########
build-logic/src/main/groovy/org.apache.groovy-performance.gradle:
##########
@@ -70,7 +70,7 @@ tasks.named('compileJmhGroovy') {
 
 tasks.register('displayJmhResults') {
     doLast {
-        println file("$buildDir/results/jmh/results.txt").text
+        println layout.buildDirectory.file("results/jmh/results.txt").get().asFile

Review Comment:
   Good catch!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org