234 lines
7.6 KiB
Groovy
234 lines
7.6 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
//apply plugin: "com.dorongold.task-tree"
|
|
|
|
|
|
def ext = rootProject.ext
|
|
|
|
/**
|
|
* @link https://mp.weixin.qq.com/s/WDap7bmM6gP7koIjEIwTtQ Gradle更小、更快构建APP的奇淫技巧
|
|
*/
|
|
|
|
android {
|
|
signingConfigs {
|
|
debug {
|
|
keyAlias 'animation'
|
|
keyPassword '123456'
|
|
storeFile file("$rootDir/animationkey")
|
|
storePassword '123456'
|
|
}
|
|
}
|
|
compileSdk ext.compileSdk
|
|
|
|
defaultConfig {
|
|
applicationId "home.smart.fly.animations"
|
|
minSdk ext.minSdk
|
|
targetSdk ext.targetSdk
|
|
versionCode 5
|
|
versionName "5.0"
|
|
flavorDimensions "versionCode"
|
|
//blur
|
|
renderscriptTargetApi 19
|
|
renderscriptSupportModeEnabled true
|
|
|
|
//
|
|
vectorDrawables.useSupportLibrary true
|
|
|
|
//65536
|
|
multiDexEnabled true
|
|
|
|
// kapt {
|
|
// arguments {
|
|
// arg("AROUTER_MODULE_NAME", project.getName())
|
|
// }
|
|
// }
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments = [AROUTER_MODULE_NAME: project.getName(),
|
|
// subModulesOfSugarAdapter: 'dataview'
|
|
]
|
|
|
|
}
|
|
}
|
|
|
|
aaptOptions {
|
|
// build 过程不会对 png 进行优化,节省时间
|
|
cruncherEnabled = false
|
|
}
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
|
|
debug {
|
|
splits.abi.enable = false
|
|
splits.density.enable = false
|
|
}
|
|
}
|
|
|
|
// just for study ,without real meaning
|
|
flavorDimensions "default"
|
|
productFlavors {
|
|
free {
|
|
versionNameSuffix "_free"
|
|
resourceConfigurations += ['ch', 'xhdpi']
|
|
minSdk 26
|
|
aaptOptions.cruncherEnabled = false
|
|
ext.alwaysUpdateBuildId = false
|
|
}
|
|
|
|
charge {
|
|
versionNameSuffix "_charge"
|
|
resourceConfigurations += ['en', 'xhdpi']
|
|
minSdk 26
|
|
aaptOptions.cruncherEnabled = false
|
|
ext.alwaysUpdateBuildId = false
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDirs = ['libs']
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_21
|
|
targetCompatibility JavaVersion.VERSION_21
|
|
}
|
|
|
|
testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
namespace 'home.smart.fly.animations'
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
//jacocoAndroidUnitTestReport {
|
|
// excludes += ['**/home/smart/fly/animations/adapter/*.*']
|
|
//}
|
|
|
|
|
|
configurations.all {
|
|
// resolutionStrategy.force 'androidx.core:core:1.0.2'
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation fileTree(include: ['*.aar'], dir: 'libs')
|
|
implementation 'com.google.code.gson:gson:2.13.1'
|
|
implementation "androidx.appcompat:appcompat:${ext.androidx_appcompat}"
|
|
implementation "com.google.android.material:material:${ext.androidx_material}"
|
|
implementation 'com.orhanobut:logger:2.2.0'
|
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
|
implementation 'de.hdodenhof:circleimageview:3.1.0'
|
|
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
|
implementation "androidx.cardview:cardview:1.0.0"
|
|
implementation "com.github.bumptech.glide:glide:$ext.glide"
|
|
implementation 'com.squareup.okhttp3:okhttp:5.1.0'
|
|
implementation 'com.squareup.okio:okio:3.15.0'
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
|
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
|
|
implementation "androidx.constraintlayout:constraintlayout:$constraint_layout"
|
|
|
|
implementation 'com.github.bingoogolapple:BGARefreshLayout-Android:2.0.1'
|
|
implementation 'com.github.bingoogolapple:BGABanner-Android:3.0.1'
|
|
implementation 'com.github.bingoogolapple:BGABaseAdapter-Android:2.0.1'
|
|
implementation 'com.jakewharton:butterknife:10.2.3'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
kapt 'com.jakewharton:butterknife-compiler:10.2.3'
|
|
implementation 'com.facebook.stetho:stetho:1.6.0'
|
|
implementation 'androidx.dynamicanimation:dynamicanimation:1.1.0'
|
|
implementation 'com.airbnb.android:lottie:6.6.7'
|
|
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
|
|
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
|
|
implementation 'net.sourceforge.streamsupport:streamsupport:1.7.4'
|
|
|
|
implementation "com.alibaba:arouter-api:$ext.arouter_api"
|
|
kapt "com.alibaba:arouter-compiler:$ext.arouter_compiler"
|
|
|
|
implementation "androidx.palette:palette-ktx:1.0.0"
|
|
implementation 'com.tencent:mmkv:2.2.2'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test:runner:1.6.2'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
|
|
|
|
implementation 'com.jakewharton.hugo:hugo-runtime:1.2.1'
|
|
|
|
|
|
implementation 'com.facebook.fresco:fresco:3.6.0'
|
|
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
|
|
implementation 'com.github.REBOOTERS:Matisse:v0.6.0'
|
|
implementation 'com.guolindev.permissionx:permissionx:1.8.1'
|
|
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
|
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
|
implementation 'com.squareup.picasso:picasso:2.71828'
|
|
implementation 'com.github.yalantis:ucrop:2.2.1'
|
|
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
|
|
implementation 'com.github.yhaolpz:FloatWindow:1.0.9'
|
|
|
|
// https://github.com/skydoves/TransformationLayout
|
|
implementation 'com.github.skydoves:transformationlayout:1.1.5'
|
|
|
|
|
|
if (!imitate_isApp.toBoolean()) {
|
|
implementation project(':imitate')
|
|
}
|
|
implementation project(path: ':subs:dataview')
|
|
implementation project(path: ':subs:skeleton')
|
|
implementation project(path: ':subs:compose')
|
|
implementation 'com.alibaba:fastjson:2.0.57'
|
|
|
|
}
|
|
|
|
import com.engineer.plugin.transforms.FooClassVisitorFactory
|
|
import com.engineer.plugin.transforms.track.TrackClassVisitorFactory
|
|
import com.engineer.plugin.transforms.tiger.TigerClassVisitorFactory
|
|
import com.android.build.api.instrumentation.FramesComputationMode
|
|
import com.android.build.api.instrumentation.InstrumentationScope
|
|
|
|
androidComponents {
|
|
onVariants(selector().all(), {
|
|
instrumentation.transformClassesWith(FooClassVisitorFactory.class, InstrumentationScope.PROJECT) {}
|
|
instrumentation.transformClassesWith(TrackClassVisitorFactory.class, InstrumentationScope.PROJECT) { param ->
|
|
param.trackOn = true
|
|
}
|
|
instrumentation.transformClassesWith(TigerClassVisitorFactory.class, InstrumentationScope.PROJECT) { param ->
|
|
param.tigerOn = true
|
|
}
|
|
instrumentation.setAsmFramesComputationMode(FramesComputationMode.COPY_FRAMES)
|
|
})
|
|
}
|
|
|
|
//ext.allDependencies.each {
|
|
// dependencies.add('implementation', it)
|
|
//}
|
|
|
|
|
|
// 自定义插件的一些测试,如果无法运行,可以暂时注释掉
|
|
//apply from: file("../gradle/custom_plugin.gradle")
|
|
apply from: file("../gradle/funs.gradle")
|
|
//apply from: file("dokit-config.gradle")
|
|
//apply from: file("./build.gradle.kts")
|
|
apply from: file("../gradle/report_apk_size_after_package.gradle") |