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"

posted on 2018-02-01 09:51  荣锋亮  阅读(288)  评论(0编辑  收藏  举报

导航