[英]Gradle - Add specific folder to JAR with different java source/compile version
I have a Gradle project where I want to expose the request/response folder out for another project to consume.我有一个 Gradle 项目,我想在其中公开请求/响应文件夹以供另一个项目使用。 My project is running in java 11. and its structure is like this我的项目运行在java 11.它的结构是这样的
src
main
java
com.xxx
request
response
service
controller
I only want to expose src.main.java.com.xxx.request/response with java 8. How should I do that?我只想公开 src.main.java.com.xxx.request/response with java 8. 我该怎么做?
below is my NOT working Gradle build下面是我不工作的 Gradle 构建
task generateJar(type: Jar) {
manifest {
attributes("Implementation-Title": "Gradle", "Implementation-Version": "0.0.1")
}
from('src/main/java') {
include '**/request/**'
include '**/response/**'
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.