Files
MoGoEagleEye/build.gradle
wangmingjun 84a6795575 Merge branch 'dev_arch_opt_3.0' into 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0'
[dev_arch_opt_3.0] 优化TextView频繁调用setText导致的频繁绘制问题; 优化状态栏上工控机相关状态的处理逻辑

See merge request zhjt/AndroidApp/MoGoEagleEye!675
2023-03-14 08:09:54 +00:00

136 lines
4.6 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply from: "config.gradle"
apply from: "javadoc.gradle"
buildscript {
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://nexus.zhidaoauto.com/repository/maven-releases/' }
maven { url 'https://nexus.zhidaoauto.com/repository/maven-public/' }
maven {
url "https://artifact.bytedance.com/repository/Volcengine/"
}
maven {
url "https://artifact.bytedance.com/repository/byteX/"
}
// mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
classpath "com.alibaba:arouter-register:1.0.12-mogo"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
classpath 'com.tencent.bugly:symtabfileuploader:2.2.1'
classpath "com.bytedance.android.byteX:base-plugin:0.3.0"
classpath "com.mogo.cloud:hook:${HOOK_LOG_VERSION}"
classpath "com.mogo.cloud:bizconfig:${BIZCONFIG_VERSION}"
classpath 'com.volcengine:apm_insight_plugin:1.4.1'
classpath "com.mogo.thread.opt:plg:${THREAD_OPT_VERSION}"
classpath 'com.mogo.cloud:systrace:1.0.1'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
classpath 'com.mogo.sticky:service:1.0.8'
classpath 'io.github.knight-zxw:lancet-plugin:0.0.4.8_mogo'
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
}
// 遇无法更新依赖情况针对Snapshot无法刷新然后sync project即可刷新完成注释该代码
// configurations.all {
// // 缓存时间设置为0立即更新
// resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
// }
}
allprojects {
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
// mavenCentral()
maven { url 'http://nexus.zhidaoauto.com/repository/maven-releases/' }
maven { url 'http://nexus.zhidaoauto.com/repository/maven-public/' }
maven {
url "https://artifact.bytedance.com/repository/Volcengine/"
}
maven {
url "https://artifact.bytedance.com/repository/byteX/"
}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task cleanAll(type: Delete) {
group = "custom"
rootProject.allprojects {
//println "delete ${it.buildDir}"
delete it.buildDir
}
}
def getValueFromRootProperties(String key) {
File file = rootProject.file('gradle.properties')
String value = "";
if (file.exists()) {
//加载资源
InputStream inputStream = file.newDataInputStream();
Properties properties = new Properties()
properties.load(inputStream)
if (properties.containsKey(key)) {
value = properties.getProperty(key)
}
}
return value
}
afterEvaluate {
rootProject.subprojects { project ->
project.afterEvaluate {
dependencies {
components {
all { ComponentMetadataDetails details ->
if (details.toString().endsWith("-SNAPSHOT")) {
details.changing = true
}
}
}
}
it.configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
}
}
}
subprojects.each {
Class<?> kotlinCompile = null
try {
kotlinCompile = Class.forName("org.jetbrains.kotlin.gradle.tasks.KotlinCompile")
} catch (Throwable t) {
t.printStackTrace()
}
if (kotlinCompile != null) {
it.tasks.withType(kotlinCompile).configureEach {
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn"]
}
}
}
}