在gradle构建中处理资源时,是否可以将某些特殊资源复制到目标目录?

processResources {
  println "Project Dir :  $projectDir"
   copy {
      from ('${projectDir}/../../../project-abc/src/main/resources/SkipColumns.properties')
      into ('${projectDir}/target/classes/META-INF/project-abc')
    }
  }

最佳答案

删除括号有效。

copy {
    from ("$projectDir/../../../project-abc/src/main/resources/SkipColumns.properties")
    into ("$projectDir/target/classes/META-INF/project-abc")
  }

07-27 21:13