根目录的的build-gradle

https://docs.gradle.org/4.3.1/dsl/org.gradle.api.Project.html#org.gradle.api.Project:buildscript(groovy.lang.Closure)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
        classpath "com.github.dcendents:android-maven-gradle-plugin:1.4.1"
    }
}

allprojects {
    repositories {
        mavenLocal()
        jcenter()
    }

    tasks.withType(Javadoc).all {
        enabled = false
        options.setEncoding('UTF-8')
    }
}

ext {
    minSdkVersion = 10
    compileSdkVersion = 23
    targetSdkVersion = compileSdkVersion
    buildToolsVersion = '23.0.2'
    supportLibVersion = '23.0.1'
    javaVersion = JavaVersion.VERSION_1_7

    GROUP = 'com.tencent.tinker'
    VERSION_NAME = "${VERSION_NAME_PREFIX}${VERSION_NAME_SUFFIX}"

    POM_PACKAGING = "pom"
    POM_DESCRIPTION= "tinker"

    POM_URL = "https://github.com/Tencent/tinker"
    POM_SCM_URL = "https://github.com/Tencent/tinker.git"
    POM_ISSUE_URL = 'https://github.com/Tencent/tinker/issues'

    POM_LICENCE_NAME = "BSD License"
    POM_LICENCE_URL = "https://opensource.org/licenses/BSD-3-Clause"
    POM_LICENCE_DIST = "repo"

    POM_DEVELOPER_ID="Tencent Wechat"
    POM_DEVELOPER_NAME="Tencent Wechat, Inc."

    BINTRAY_LICENCE= ['BSD 3-Clause']
    BINTRAY_ORGANIZATION = "tinker"

}
  • buildscript
    声明的是gradle脚本自身需要使用的资源。

  • repositories
    配置该想项目需要的存储库

  • dependencies
    配置该项目的依赖项


    image.png

    image.png
  • allprojects
    配置该项目以及每一个子项目

  • tasks
    项目本质上是任务对象的集合。每个任务执行一些基本的工作,例如编译类、运行单元测试或压缩WAR文件。

  • ext
    Gradle领域对象的一个属性,我们将自定义的属性添加到ext对象上,Build.gradle中的其它片段可以使用

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,260评论 19 139
  • Spring Boot 参考指南 介绍 转载自:https://www.gitbook.com/book/qbgb...
    毛宇鹏阅读 46,999评论 6 342
  • 附上原文作者连接:作者:金诚 一.榜单介绍 排行榜包括四大类: 单一框架:仅提供路由、网络层、UI层、通信层或其他...
    这个美嘉不姓陈阅读 2,294评论 1 35
  • 昨天下了倾盆大雨,突如其来。大风席卷,整个雨幕倾斜着有40度以上吧,越过我家的阳台到了客厅。倒也把阳台冲刷了一遍。...
    何偀阅读 324评论 2 3
  • 文/斯年 我起了很晚的床,想整天赖在被窝里,享受周六带给我的舒适。 我是那种受不了太快节奏生活的人,忙了五个工作日...
    亲爱的兮月阅读 303评论 2 1