生成ship.io .jar文件和javadoc [英] Generate .jar file and javadoc in ship.io

查看:195
本文介绍了生成ship.io .jar文件和javadoc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这为我的库.jar文件以及javadocs一个摇篮任务:

I have a Gradle task which generate .jar file for my library as well as Javadocs:

apply plugin: 'com.android.library'

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += project.files(project.android.getBootClasspath())
    destinationDir = file("$output javadoc/")
    //Suppress warnings that can cause fail build on continuous integration tools
    failOnError false
}

task clearJar(type: Delete) {
    delete "$output $filename"
}

task makeJar(type: Copy) {
    from('build/intermediates/bundles/release/')
    into("$output")
    include('classes.jar')
    rename('classes.jar', "$filename")
}

//Dependent tasks will be executed first before executing requested task
makeJar.dependsOn(javadoc, clearJar, ':app:packageReleaseJar')

在持续集成框架(ship.io),我现在用的,整理makeJar任务后,我收到所有来自 /应用程序/编译/ 中的伪像以下几点:

In the continues integration framework (ship.io) which I am using, after finishing makeJar task, I receive all the following from /app/build/ in Artifacts:

tmp.zip Zip Archive 
intermediates.zip   Zip Archive 
generated.zip   Zip Archive 
myLib.jar       
classes.jar

但我只是想有一个zip文件包括 mylib.jar和Javadoc 。中介,生成类和温度是不希望的。你知道,任何解决办法?

But I just want to have a zip file includes mylib.jar and javadocs. Intermediated, generated, classes and temp is not desired. Do you know any solution for that?

附录:

我添加一个任务,删除不需要的文件夹:

I add another task to delete unwanted folders:

task releaseLib(type: Delete, dependsOn: makeJar) {
    delete 'build/generated/'
    delete 'build/intermediates/'
    delete 'build/outputs/'
    delete 'build/tmp/'
}

这解决了问题,但如果你有更好的建议,请让我知道。

This solves problem, but if you have better suggestion, please let me know.

推荐答案

我的名字叫埃德温,我与Ship.io一名工程师。

My name is Edwin, and I'm an engineer with Ship.io.

您我们如何建立文物的理解是完全正确的。我们只要摇篮任务完成上传文物。如果你想清理文物,你需要这样做完全按照你描述的摇篮运行之前。

Your understanding of how we build artifacts is exactly correct. We upload artifacts as soon as the Gradle task completes. If you want to clean up the artifacts, you'll need to do so exactly as you describe before the Gradle runs.

随时在这里回复或支持票您提出,如果您有任何其他问题。

Feel free to reply here or in the support ticket you filed if you have any other questions.

这篇关于生成ship.io .jar文件和javadoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆