• gradle学习笔记


    一直想着花时间学习下gradle,今天有空。入门一下。参考:极客学院gradle使用指南,官方文档:gradle-2.12/docs/userguide/installation.html,以及百度阅读的官方文档中文译本:gradle翻译

    手下下载gradle的zip,然后根据极客学院的教程手动打一遍。

    测试代码:https://github.com/chenxing12/l4gradle


    笔记: 

    Chapter 4. Using the Gradle Command-Line

    1. each task only is executed only once;

    2. you can exclude a task from being executed using the -x command-line option and providing the name of the task to execute;
    3. By default,Gradle will abort execution and fail the build as soon as any task fails.This allows the build to complete sooner,but hides other failures that would have occured.In order to discover as many failures as possible in a single build execution,you can use the --continue option.
    4. 默认,执行遇到错误即停止,这是为了尽快build,但会隐藏其他未执行的错误。为了发现更多的错误,使用--continue选项。
    5. You can also abbreviate each word in a camel task name.For example,you can execute task  compileTest by running gradle compileTest or gradle cT.
    6. 你可以使用缩写代替task name。比如驼峰。
    7. When you run the gradle command,it looks for a build file in the current directory.You can user the -b option to select another build file.If you use -b option then settings.gradle fil eis not used.
    8. 在当前目录下执行gradle命令会寻找当前目录下的build file。你可以使用-b选项来指定另一个file。
    9. Alternatively,you can use the -p option to specify the project directory to use.For multi-project builds you should user -p option instead of -b option.
    10. 使用-p选项来指定运行的项目目录。
    11. Obtaining infomation about projects.gradle -q projects
    12. 获取项目列表,在build.gradle使用descroption= 'your desc'
    13. Running gradle tasks gives you a list of the main tasks of the seleted projet.This report shows the default tasks for the project,if any,and description for each task.
    14. 获取tasks列表。使用task_name{description='your desc' group = 'your group'}来描述task
    15. Running gradle help --task task_name gives you detailed information about a specific task or multiple matching the given task name in your multiproject build.
    16. 通过gradle help --task taskname来查看task详情
    17. Running gradle dependencies gives you a list of the dependecies of the selected project,broken down by configuration.For each configuration,the direct and transitive dependencies of that configuration are shown in a tree.
    18. 通过gradle dependencies来查看依赖。
    19. Since a dependency report can get large,it can be useful to restrict the report to a particular configuration.This is a achieved with the optional --configuration parameter.
    20. 通过--configuration 来显示特定的依赖
    21. Running gradle properties gives you a list of the properties of the selected project.This is a snippet from the output

    Chapter 6. The Gradle Daemon

    1.  A daemon is a computer program that runs as a background process,rather than being under the diret control of an interactive user.
    2. 守护进程(后台程序)是一个计算机程序:作为后台程序运行而不是直接被用户操控。
    3. Which one to use is up to personal preference.
    4. 使用哪个决定于个人偏向。

    Chapter 7. Dependency Management Basics

    1. Very roughly,dependency management is made up of two pieces.Firstly,Gradle needs to known about the things that your project needs to build or run,in order to find them.We call these incoming files the dependecies of the project.Secondly,Gradle nees to build and upload the things that your project produces.We call these outgoing files the publications of the project.Let's look at these ewo pieces in more detail:
    2. 大概的讲,依赖管理由两部分组成。第一,gradle需要知道你的项目构建或运行所需要的东西,为了找到他们。我们称呼他们这些将要获得的files为项目依赖。第二,gradle需要创建和上传你的项目的产品。我们程这些外出的files为项目的发布。让我们更详细的看看这两个部分:

    单词:

    guarantee详细»

    [gær(ə)n'tiː]想启用英文朗读功能吗?请先安装flash插件! [,ɡærən'ti]想启用英文朗读功能吗?请先安装flash插件!
    • n. 保证;担保;保证人;保证书;抵押品
    • vt. 保证;担保

    indicate详细»

    ['ɪndɪkeɪt]想启用英文朗读功能吗?请先安装flash插件! ['ɪndɪket]想启用英文朗读功能吗?请先安装flash插件!
    • vt. 表明;指出;预示;象征

    phase详细»

    [feɪz]想启用英文朗读功能吗?请先安装flash插件! [fez]想启用英文朗读功能吗?请先安装flash插件!
    • n. 相;阶段;[天] 位相
    • vt. 使定相;逐步执行
    • vi. 逐步前进

    summary详细»

    ['sʌm(ə)rɪ]想启用英文朗读功能吗?请先安装flash插件! ['sʌməri]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 简易的;扼要的
    • n. 概要,摘要,总结

    profile详细»

    ['prəʊfaɪl]想启用英文朗读功能吗?请先安装flash插件! ['profaɪl]想启用英文朗读功能吗?请先安装flash插件!
    • n. 侧面;轮廓;外形;剖面;简况
    • vt. 描…的轮廓;扼要描述
    • vi. 给出轮廓

    snippet详细»

    ['snɪpɪt]想启用英文朗读功能吗?请先安装flash插件! 想启用英文朗读功能吗?请先安装flash插件!
    • n. 小片;片断;不知天高地厚的年轻人

    typically详细»

    ['tɪpɪkəlɪ]想启用英文朗读功能吗?请先安装flash插件! ['tɪpɪkli]想启用英文朗读功能吗?请先安装flash插件!
    • adv. 代表性地;作为特色地

    related详细»

    [rɪ'leɪtɪd]想启用英文朗读功能吗?请先安装flash插件! [rɪ'letɪd]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 有关系的,有关联的;讲述的,叙述的
    • v. 叙述(relate过去式)

    investigate详细»

    [ɪn'vestɪgeɪt]想启用英文朗读功能吗?请先安装flash插件! [ɪn'vɛstɪɡet]想启用英文朗读功能吗?请先安装flash插件!
    • v. 调查;研究

    extremely详细»

    [ɪk'striːmlɪ; ek-]想启用英文朗读功能吗?请先安装flash插件! [ɪk'strimli]想启用英文朗读功能吗?请先安装flash插件!
    • adv. 非常,极其;极端地

    insight详细»

    ['ɪnsaɪt]想启用英文朗读功能吗?请先安装flash插件! ['ɪn'saɪt]想启用英文朗读功能吗?请先安装flash插件!
    • n. 洞察力;洞悉
    • n. (Insight)人名;(英)因赛特

    visualise ['vɪʒʊəlˌaɪz] 想启用英文朗读功能吗?请先安装flash插件!详细»

    • vt. 使…可见;使…具体化(等于visualize)
    • vi. 想象;显现

    restrict详细»

    [rɪ'strɪkt]想启用英文朗读功能吗?请先安装flash插件! [rɪ'strɪkt]想启用英文朗读功能吗?请先安装flash插件!
    • vt. 限制;约束;限定

    look for  报错

    • 寻找

    specify 

    vt. 指定;详细说明;列举;把…列入说明书

    encounter  报错

     英 [ɪn'kaʊntə; en-]  美 [ɪn'kaʊntɚ] 跟读 口语练习
    • vt. 遭遇,邂逅;遇到
    • n. 遭遇,偶然碰见
    • vi. 遭遇;偶然相遇

    occur 

     英 [ə'kɜː]  美 [ə'kɝ]  全球发音 跟读 口语练习
    • vi. 发生;出现;存在

    advantage详细»

    [əd'vɑːntɪdʒ]想启用英文朗读功能吗?请先安装flash插件! [əd'væntɪdʒ]想启用英文朗读功能吗?请先安装flash插件!
    • n. 优势;利益;有利条件
    • vi. 获利
    • vt. 有利于;使处于优势

    tremendous详细»

    [trɪ'mendəs]想启用英文朗读功能吗?请先安装flash插件! [trə'mɛndəs]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 极大的,巨大的;惊人的

    transparent详细»

    [træn'spær(ə)nt; trɑːn-; -'speə-]想启用英文朗读功能吗?请先安装flash插件! [træns'pærənt]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 透明的;显然的;坦率的;易懂的

    argue详细»

    ['ɑːgjuː]想启用英文朗读功能吗?请先安装flash插件! ['ɑrgjʊ]想启用英文朗读功能吗?请先安装flash插件!
    • vi. 争论,辩论;提出理由
    • vt. 辩论,争论;证明;说服
    • n. (Argue)人名;(英、法)阿格

    valid详细»

    ['vælɪd]想启用英文朗读功能吗?请先安装flash插件! ['vælɪd]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 有效的;有根据的;合法的;正当的

    curve详细»

    [kɜːv]想启用英文朗读功能吗?请先安装flash插件! [kɝv]想启用英文朗读功能吗?请先安装flash插件!
    • n. 曲线;弯曲;曲线球;曲线图表
    • vt. 弯;使弯曲
    • vi. 成曲形
    • adj. 弯曲的;曲线形的

    due to详细»

    想启用英文朗读功能吗?请先安装flash插件! 想启用英文朗读功能吗?请先安装flash插件!
    • adv. 由于;应归于

    expressive详细»

    [ɪk'spresɪv; ek-]想启用英文朗读功能吗?请先安装flash插件! [ɪk'sprɛsɪv]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 表现的;有表现力的;表达…的

    syntax详细»

    ['sɪntæks]想启用英文朗读功能吗?请先安装flash插件! ['sɪntæks]想启用英文朗读功能吗?请先安装flash插件!
    • n. 语法;句法;有秩序的排列

    priority详细»

    [praɪ'ɒrɪtɪ]想启用英文朗读功能吗?请先安装flash插件! [praɪ'ɔrəti]想启用英文朗读功能吗?请先安装flash插件!
    • n. 优先;优先权;[数] 优先次序;优先考虑的事

    at the moment详细»

    想启用英文朗读功能吗?请先安装flash插件! 想启用英文朗读功能吗?请先安装flash插件!
    • 此刻;当时

    community详细»

    [kə'mjuːnɪtɪ]想启用英文朗读功能吗?请先安装flash插件! [kə'mjʊnəti]想启用英文朗读功能吗?请先安装flash插件!
    • n. 社区;[生态] 群落;共同体;团体

    effort详细»

    ['efət]想启用英文朗读功能吗?请先安装flash插件! ['ɛfɚt]想启用英文朗读功能吗?请先安装flash插件!
    • n. 努力;成就

    extensive  报错

     英 [ɪk'stensɪv; ek-]  美 [ɪk'stɛnsɪv]  全球发音 跟读 口语练习
    • adj. 广泛的;大量的;广阔的

    vague详细»

    [veɪg]想启用英文朗读功能吗?请先安装flash插件! [veɡ]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 模糊的;含糊的;不明确的;暧昧的
    • n. (Vague)人名;(法)瓦格;(英)韦格

    build by convention

    构建按照惯例,按照约定构建

    concrete详细»

    ['kɒŋkriːt]想启用英文朗读功能吗?请先安装flash插件! ['kɑŋkrit]想启用英文朗读功能吗?请先安装flash插件!
    • adj. 混凝土的;实在的,具体的;有形的
    • vi. 凝结
    • vt. 使凝固;用混凝土修筑
    • n. 具体物;凝结物
  • 相关阅读:
    【KMP】Period
    【KMP】Cyclic Nacklace
    【KMP】Oulipo
    【KMP】Number Sequence
    二分
    Stock 贪心经典 Zoj2921
    D. Block Tower
    烦人的dp
    搜索
    hdu 一个人的旅行
  • 原文地址:https://www.cnblogs.com/woshimrf/p/5372916.html
Copyright © 2020-2023  润新知