Java Gradle导出生成空罐
我的项目有一个父项目和几个包含的项目。其中一个叫做FileEncrypter,另一个叫做ListenerPattern。 我在父项目中有以下脚本:Java Gradle导出生成空罐,java,eclipse,gradle,jar,Java,Eclipse,Gradle,Jar,我的项目有一个父项目和几个包含的项目。其中一个叫做FileEncrypter,另一个叫做ListenerPattern。 我在父项目中有以下脚本: subprojects{ apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'java' repositories { mavenCentral() } dependencies { compile
subprojects{
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'build', include: '*.jar')
testCompile 'junit:junit:4.12'
testCompile 'org.slf4j:slf4j-simple:1.6.1'
}
task export(type: Jar) << {
manifest {
attributes 'Implementation-Title': 'Exported jar',
'Implementation-Version': version
}
sourceCompatibility = 1.7
baseName = "$it.project.name"
println baseName
println sourceSets.main.java
from { sourceSets.main.java }
with jar
}
}
子项目{
应用插件:“eclipse”
应用插件:“maven”
应用插件:“java”
存储库{
mavenCentral()
}
依赖项{
编译文件树(目录:“build”,包括:“*.jar”)
testCompile'junit:junit:4.12'
testCompile'org.slf4j:slf4j simple:1.6.1'
}
任务导出(类型:Jar)您是否在任何地方修改源集?否。注释中至少包含15个字符……您是否可以尝试删除