• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

mparajuli/cs310-gradle-hello-world

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mparajuli/cs310-gradle-hello-world

开源软件地址(OpenSource Url):

https://github.com/mparajuli/cs310-gradle-hello-world

开源编程语言(OpenSource Language):

Java 60.3%

开源软件介绍(OpenSource Introduction):

Hello World

This repository will allow you to build your first Java project of the semester, including unit and acceptance tests, using Gradle as the build tool.

Building the Project

After you have cloned the repository, you should be able to navigate to the directory containing the build.gradle file. There, you can build the project by running this command:

gradle build

You can then run the acceptance tests using the Robot Framework plugin:

gradle runrobot

Finally, you can run the unit test coverage report using the Java Code Coverage (JaCoCo) plugin:

gradle jacocoTestReport

You can even do all of those things in one command:

gradle build jacocoTestReport runrobot

When you want to get rid of all of the temporary files (compiled class files, etc.), enter this command:

gradle clean

If you want to do a full build and reporting from a clean project, you can just string it all together:

gradle clean build jacocoTestReport runrobot

Structure

The directory structure that is assumed by Gradle (though it can be changed if you want) is as follows:

project root     (root directory of project, probably "gradle-hello-world")
           |
            - build.gradle    (contains the instructions for the build tasks)
           |
            - src             (root directory of the source code; main and tests)
                |
                 - main       (root directory of normal source code)
                |     |
                |      - java (all packages go here)
                |           |
                |            - edu    
                |           |    |
                |           |     - jsu
                |           |         |
                |           |          - mcis (source code goes here)
                |           |
                |            - keywords (Robot Framework keyword code goes here)
                |
                 - test       (root directory of test code, both unit and acceptance)
                      |
                       - acceptancetest    (all Robot Framework test files go here)
                      |
                       - java (all packages go here)
                            |
                             - edu    
                                 |
                                  - jsu
                                      |
                                       - mcis (unit test code goes here)

After you run gradle build, a new build directory will automatically be created. This will contain all of the generated files (compiled class files, JAR files, reports, etc.). The most important of these are as follows:

build/reports/tests/test/index.html

This file holds the results of all of the unit tests.

build/reports/jacoco/test/html/index.html

This file holds the unit test code coverage results from JaCoCo.

build/robot-results/report.html

This file holds the Robot Framework test results.

build/robot-results/debug.log

This file holds all of the debug information from the Robot Framework tests.

build/libs/<name>.jar

This file (where name is specified in the jar settings of gradle.build) is the fully bundled code for the project. You can run this JAR by entering the following command from the project root:

java -jar build/libs/<name>.jar




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
slackhq/slack-gradle-plugin: The core Gradle plugin and associated logic used fo ...发布时间:2022-06-11
下一篇:
prakashk0301/gradle-calculator发布时间:2022-06-11
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap