EachFile in Gradle Copia-compito non è di lavoro

0

Domanda

Ho un Gradle regola come:

tasks.addRule("Pattern: updatelight<Path> (copies files to ../<Path>).") { String taskName ->
  if (taskName.startsWith("updatelight")) {
    task([ "type": Copy ], taskName) {
      
      
      def projectGroups = (sub + root)
      
      def testEnvPath = taskName - 'updatelight'
      into ("../${testEnvPath}/")
      
      
      logger.info("Copies user.xml")
      projectGroups.each { project ->
        if (!project.isEmpty()) {
          from (project.output) {
            into "cfg/${project.newPath}"
            
            eachFile { file ->
              println "  ${file.sourcePath} -> ${file.path}" 
              println '----------------------------------------------'
            }
          }
        }
      }
[...]

Il mio problema è, eachFile { ... } non è la stampa a console. Qualche suggerimento? Io sono un Gradle-principiante e cerco di aggiungere qualche registrazione per l'attività esistente.

gradle groovy
2021-11-23 12:15:31
1

Migliore risposta

0

Non c'era nessun problema con il codice. A causa di cache per le azioni intraprese, quindi, nessuna registrazione.

2021-11-23 14:12:41

In altre lingue

Questa pagina è in altre lingue

Русский
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................