37 lines
1.3 KiB
Groovy
37 lines
1.3 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||
|
||
buildscript {
|
||
|
||
repositories {
|
||
jcenter()
|
||
}
|
||
|
||
dependencies {
|
||
//这一点非常重要,那就是gradle build tools的版本设置成1.1.2以上,因为以前的版本有严重的bug
|
||
classpath 'com.android.tools.build:gradle:2.3.3'
|
||
//maven打包需要android-maven-plugin (:1.5指定版本或者:latest.release最新版本)
|
||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||
//上传Bintray需要 1.7.1
|
||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
|
||
//最新版本,需要配合gradle3.0+,对应关系https://github.com/dcendents/android-maven-gradle-plugin
|
||
//classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||
}
|
||
}
|
||
|
||
//统一编译环境
|
||
//minSdkVersion <= targetSdkVersion <= compileSdkVersion
|
||
ext {
|
||
compileSdkVersion = 23 //编译SDK版本
|
||
buildToolsVersion = "25.0.3"//编译SDK工具版本
|
||
minSdkVersion = 9 //兼容最低版本
|
||
targetSdkVersion = 22 //23需要特殊处理动态授权
|
||
}
|
||
|
||
allprojects {
|
||
repositories {
|
||
maven { url "https://jitpack.io" }
|
||
maven { url "https://dl.bintray.com/zengfantian/android"}
|
||
jcenter()
|
||
}
|
||
}
|