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"
备注:
上面配置同时包含了源码打包
 
 
 
 
·