groovy 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
}
jar {
    manifest {
        attributes "Main-Class":"com.dalong.Application"
    }
}
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:57  荣锋亮  阅读(222)  评论(0编辑  收藏  举报

导航