// 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
配置該想項(xiàng)目需要的存儲(chǔ)庫(kù)-
dependencies
配置該項(xiàng)目的依賴項(xiàng)
image.png
image.png allprojects
配置該項(xiàng)目以及每一個(gè)子項(xiàng)目tasks
項(xiàng)目本質(zhì)上是任務(wù)對(duì)象的集合指攒。每個(gè)任務(wù)執(zhí)行一些基本的工作,例如編譯類、運(yùn)行單元測(cè)試或壓縮WAR文件却盘。ext
Gradle領(lǐng)域?qū)ο蟮囊粋€(gè)屬性蒜焊,我們將自定義的屬性添加到ext對(duì)象上单刁,Build.gradle中的其它片段可以使用