78 lines
2.7 KiB
Groovy
78 lines
2.7 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
apply from: 'dependencies.gradle'
|
|
|
|
buildscript {
|
|
ext.kotlin_version = '1.3.31'
|
|
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url "https://maven.google.com" }
|
|
maven { url "https://dl.bintray.com/thelasterstar/maven/" } //weiboSDK
|
|
}
|
|
|
|
dependencies {
|
|
classpath "com.android.tools.build:gradle:3.4.1"
|
|
|
|
// for tinker
|
|
// classpath 'com.tencent.tinker:tinker-patch-gradle-plugin:1.8.1'
|
|
|
|
// bugly for tinker
|
|
classpath "com.tencent.bugly:tinker-support:1.1.1"
|
|
|
|
// for apkChannelPackage https://github.com/ltlovezh/ApkChannelPackage
|
|
// 这个插件会让 AS 报 "API 'variant.getAssemble()' is obsolete and has been replaced with 'variant.getAssembleProvider()'."
|
|
// 的警告,但新版本亦未解决 https://github.com/Tencent/VasDolly/issues/69 ,所以暂时不理
|
|
classpath "com.leon.channel:plugin:1.0.5"
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
maven { url 'https://jitpack.io' }
|
|
maven { url "https://dl.bintray.com/thelasterstar/maven/" }//weiboSDK
|
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
|
|
maven { url "http://dl.bintray.com/piasy/maven" }
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
subproject ->
|
|
afterEvaluate {
|
|
if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
|
|
if (!android.compileSdkVersion) {
|
|
android {
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
}
|
|
}
|
|
android {
|
|
buildToolsVersion rootProject.ext.buildToolsVersion
|
|
|
|
defaultConfig {
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
|
|
// for those defined in AndroidManifest.xml
|
|
manifestPlaceholders = [
|
|
manifestApplicationId: "${applicationId}",
|
|
tencentAppId : "${TENCENT_APPID}",
|
|
]
|
|
}
|
|
lintOptions.abortOnError false
|
|
|
|
packagingOptions {
|
|
exclude 'META-INF/NOTICE'
|
|
exclude 'META-INF/LICENSE'
|
|
exclude 'META-INF/DEPENDENCIES'
|
|
exclude 'META-INF/services/javax.annotation.processing.Processor'
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
} |