mirror of
https://github.com/Tencent/QMUI_Android.git
synced 2026-10-18 13:11:05 +08:00
66 lines
2.1 KiB
Groovy
66 lines
2.1 KiB
Groovy
apply plugin: 'com.android.library'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
version = QMUI_VERSION
|
|
|
|
//noinspection GroovyMissingReturnStatement
|
|
android {
|
|
compileSdkVersion parent.ext.compileSdkVersion
|
|
lintOptions {
|
|
abortOnError false
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdkVersion parent.ext.minSdkVersion
|
|
targetSdkVersion parent.ext.targetSdkVersion
|
|
// vectorDrawables.useSupportLibrary = true // 与 com.android.support:support-vector-drawable 搭配使用,禁掉 Android Studio 自动生成 png 的功能
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
// libraryVariants.all{ variant ->
|
|
// variant.mergeResources.doLast {
|
|
// replaceTheme variant
|
|
// }
|
|
// }
|
|
// testVariants.all { variant ->
|
|
// variant.mergeResources.doLast {
|
|
// replaceTheme variant
|
|
// }
|
|
// }
|
|
}
|
|
|
|
//def replaceTheme(variant){
|
|
// println "dirName::${variant.dirName}"
|
|
// def output = "AppConfigTheme"
|
|
//
|
|
// File valuesFile = file("${buildDir}/intermediates/res/merged/${variant.dirName}/values/values.xml")
|
|
// String content = valuesFile.getText('UTF-8')
|
|
// content = content.replaceAll(/\$\{QMUI_PARENT_THEME\}/, output)
|
|
// valuesFile.write(content, 'UTF-8')
|
|
//}
|
|
|
|
dependencies {
|
|
api "androidx.appcompat:appcompat:$appcompatVersion"
|
|
api "androidx.annotation:annotation:$annotationVersion"
|
|
api "com.google.android.material:material:$materialVersion"
|
|
api "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
|
|
api project(':type')
|
|
lintChecks project(':lintrule')
|
|
|
|
//test
|
|
testImplementation "junit:junit:$junitVersion"
|
|
api 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
|
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
}
|
|
|
|
// deploy
|
|
File deployConfig = rootProject.file('gradle/deploy.properties')
|
|
if (deployConfig.exists()) {
|
|
apply from: rootProject.file('gradle/deploy.gradle')
|
|
} |