gradle 构建包含源码配置
参考配置:
apply plugin: "idea"
apply plugin: "groovy"
apply plugin: "eclipse"
apply plugin: "application"
dependencies {
compile localGroovy()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
mainClassName = "com.dalong.Application"