239 lines
8.4 KiB
Groovy
239 lines
8.4 KiB
Groovy
apply plugin: 'com.android.application'
|
||
apply plugin: 'kotlin-android'
|
||
ext.mainApp = true //标记为主app module
|
||
apply from: rootProject.file('cc-settings-2.gradle')
|
||
|
||
apply plugin: 'kotlin-kapt'
|
||
|
||
static def releaseTime() {
|
||
return new Date().format("yyyy-MM-dd-HH.mm", TimeZone.getTimeZone("GMT+8"))
|
||
}
|
||
|
||
android {
|
||
namespace 'com.fanghoo.mendian'
|
||
compileSdk rootProject.ext.android.compileSdkVersion
|
||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
||
buildToolsVersion rootProject.ext.android.buildToolsVersion
|
||
|
||
defaultConfig {
|
||
applicationId rootProject.ext.android.applicationId
|
||
minSdkVersion rootProject.ext.android.minSdkVersion
|
||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
||
versionCode rootProject.ext.android.versionCode
|
||
versionName rootProject.ext.android.versionName
|
||
multiDexEnabled rootProject.ext.android.multiDexEnabled //突破应用方法数65535的一个限制
|
||
manifestPlaceholders = rootProject.ext.android.manifestPlaceholders
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
ndk {
|
||
// 设置支持的SO库架构
|
||
abiFilters 'armeabi', 'x86', 'armeabi-v7a'
|
||
}
|
||
flavorDimensions "versionCode"
|
||
javaCompileOptions {
|
||
annotationProcessorOptions {
|
||
arguments = [
|
||
'resourcePackageName': "com.fanghoo.mendian",
|
||
"androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()
|
||
]
|
||
}
|
||
}
|
||
}
|
||
|
||
lintOptions {
|
||
checkReleaseBuilds false
|
||
abortOnError false
|
||
}
|
||
|
||
|
||
sourceSets {
|
||
main {
|
||
jniLibs.srcDirs = ['libs']
|
||
}
|
||
}
|
||
|
||
lintOptions {
|
||
checkReleaseBuilds false
|
||
abortOnError false
|
||
}
|
||
|
||
buildFeatures {
|
||
buildConfig true
|
||
dataBinding true
|
||
}
|
||
|
||
//签名
|
||
signingConfigs {
|
||
release {
|
||
storeFile file('fenghoo.jks')
|
||
storePassword "fenghoo"
|
||
keyAlias "fenghoo"
|
||
keyPassword "fenghoo"
|
||
}
|
||
|
||
}
|
||
buildTypes {
|
||
release {
|
||
// 不显示Log
|
||
buildConfigField "boolean", "LOG_DEBUG", "false"
|
||
//混淆
|
||
minifyEnabled true
|
||
//Zipalign优化
|
||
zipAlignEnabled true
|
||
// 移除无用的resource文件
|
||
shrinkResources true
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
signingConfig signingConfigs.release
|
||
}
|
||
debug {
|
||
//重要部分
|
||
signingConfig signingConfigs.release
|
||
|
||
}
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = '1.8'
|
||
}
|
||
|
||
packagingOptions {
|
||
jniLibs {
|
||
useLegacyPackaging = true
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
|
||
this.android.sourceSets {
|
||
main {
|
||
jniLibs.srcDirs = ['libs']
|
||
res.srcDirs = ['src/main/res', 'src/main/res_marking', 'src/main/res_data', 'src/main/res_zxing', 'src/main/res_yingxiao']
|
||
}
|
||
}
|
||
configurations.all {
|
||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||
def requested = details.requested
|
||
if (requested.group == 'com.android.support') {
|
||
if (!requested.name.startsWith("multidex")) {
|
||
details.useVersion '27.1.1'
|
||
}
|
||
}
|
||
}
|
||
|
||
}
|
||
|
||
|
||
// 保证引用jar包最新,建议使用
|
||
configurations.all {
|
||
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' // 动态版本 x.x.+
|
||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'// 变化版本 x.x.x
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||
implementation 'androidx.appcompat:appcompat:1.0.0'
|
||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||
testImplementation 'junit:junit:4.12'
|
||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
|
||
//加载对话框
|
||
api 'com.github.ForgetAll:LoadingDialog:v1.0.4'
|
||
api 'com.nineoldandroids:library:2.4.0'
|
||
|
||
//雷达图
|
||
api 'com.github.PhilJay:MPAndroidChart:v3.0.2'
|
||
//三级联动选择
|
||
api 'com.contrarywind:Android-PickerView:3.2.6'
|
||
//popwindow
|
||
// api 'com.github.pinguo-zhouwei:CustomPopwindow:2.1.1' // 依赖找不到,暂时注释
|
||
//选择图片
|
||
api 'com.github.lovetuzitong:MultiImageSelector:1.2'
|
||
//图片压缩
|
||
api 'id.zelory:compressor:1.0.4'
|
||
//搜索
|
||
api project(':searchbox')
|
||
//上传图像
|
||
api 'com.jph.takephoto:takephoto_library:4.0.3'
|
||
api('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
|
||
exclude module: 'support-v4'
|
||
}
|
||
api project(':PushSDK')
|
||
implementation files('libs/SocialSDK_WeChat_Simplify.jar')
|
||
implementation files('libs/NewLivePlayer-new.jar')
|
||
|
||
// api 'com.github.zhengcx:ShadowHelper:v1.0' // 依赖找不到,暂时注释
|
||
api 'com.hannesdorfmann.mosby3:mvp:3.0.0-alpha4'
|
||
|
||
implementation files('libs/tbs_sdk_thirdapp_v3.2.0.1104_43200_sharewithdownload_withfilereader_withoutGame_obfs_20170609_115346.jar')
|
||
//内存溢出测试工具
|
||
debugApi 'com.squareup.leakcanary:leakcanary-android:1.6.1'
|
||
releaseApi 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
|
||
|
||
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
|
||
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
||
api project(':picture_library')
|
||
|
||
api 'com.squareup.retrofit2:retrofit:2.3.0'
|
||
api 'com.squareup.retrofit2:converter-gson:2.3.0'
|
||
api 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
|
||
api 'com.amitshekhar.android:rx2-android-networking:1.0.0'
|
||
api 'com.google.android.material:material:1.0.0'
|
||
api 'com.tencent.mm.opensdk:wechat-sdk-android-with-mta:5.3.1'
|
||
api 'com.airbnb.android:lottie:1.0.1'
|
||
implementation files('libs/eventbus-2.4.0.jar')
|
||
api 'ru.noties:scrollable:1.3.0'
|
||
api 'ru.noties:vt:1.0.0'
|
||
api 'com.tencent.bugly:crashreport:latest.release'
|
||
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
||
api 'com.tencent.bugly:nativecrashreport:latest.release'
|
||
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
||
api 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
||
api 'com.github.clans:fab:1.6.4'
|
||
implementation files('libs/umeng-share-Ding-6.9.4.jar')
|
||
implementation files('libs/libddshare.jar')
|
||
implementation 'com.github.oneAcorn:OverlayCardViewPager:v1.0'
|
||
//折叠效果卡片布局
|
||
implementation files('libs/libwwsdk.jar')
|
||
implementation 'com.google.zxing:core:3.3.0'
|
||
implementation files('libs/ioc_sdk.jar')
|
||
implementation project(':citypicker')
|
||
api 'com.amap.api:location:latest.integration'
|
||
implementation files('libs/Msc.jar')
|
||
implementation files('libs/alipaySdk-20180601.jar')
|
||
|
||
//Google开源的一个布局控件
|
||
implementation project(':multiple-status-view')
|
||
//kotlin 支持库
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||
// Kotlin 标准库(DataBinding 编译器在 AGP 8.x 中需要)
|
||
compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||
//smartRefreshLayout 下拉刷新
|
||
implementation 'com.scwang.smartrefresh:SmartRefreshLayout:1.0.3'
|
||
implementation 'com.scwang.smartrefresh:SmartRefreshHeader:1.0.3'
|
||
implementation 'jp.wasabeef:richeditor-android:1.2.2'
|
||
// 注意:由于 cc-register 插件与 AGP 8.x 不兼容,addComponent 方法不可用
|
||
// 使用标准的 implementation project() 方式替代
|
||
implementation project(':ccdemo')
|
||
implementation project(':personnel')
|
||
implementation project(':demo_component_a')
|
||
implementation project(':video')
|
||
implementation project(':xiansuo')
|
||
|
||
implementation project(path: ':base')
|
||
implementation 'jp.wasabeef:richeditor-android:1.2.2'
|
||
|
||
|
||
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.17'
|
||
implementation 'me.jessyan:autosize:0.9.5'
|
||
implementation 'org.jsoup:jsoup:1.10.1'
|
||
|
||
// implementation 'com.bytedance.ies.ugc.aweme:opensdk-china-external:0.1.4.0' // 依赖找不到,暂时注释
|
||
// implementation 'com.bytedance.ies.ugc.aweme:opensdk-common:0.1.4.0' // 依赖找不到,暂时注释
|
||
}
|