add kotlin parallel and incremental,plus gradle cache

This commit is contained in:
unknown
2020-11-10 17:40:24 +08:00
parent b85738b920
commit a58aa2caaf
3 changed files with 34 additions and 11 deletions

View File

@@ -373,18 +373,18 @@ dependencies {
apply from: "./functions/widgets.gradle"
apply from: "./functions/tts.gradle"
implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version:'0.6.6', changing: true
// implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version:'0.6.6', changing: true
}
apply plugin: 'com.tencent.matrix-plugin'
matrix {
trace {
enable = true //if you don't want to use trace canary, set false
baseMethodMapFile = "${project.buildDir}/matrix_output/Debug.methodmap"
blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt"
}
}
//apply plugin: 'com.tencent.matrix-plugin'
//matrix {
// trace {
// enable = true //if you don't want to use trace canary, set false
// baseMethodMapFile = "${project.buildDir}/matrix_output/Debug.methodmap"
// blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt"
// }
//}
android.applicationVariants.all { variant ->
def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00"))

View File

@@ -21,7 +21,7 @@ buildscript {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.71'
classpath "com.alibaba:arouter-register:1.0.2"
classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.4'
classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
// classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true }
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@@ -7,7 +7,30 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
#org.gradle.jvmargs=-Xmx1536m
org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx4096m
#开启gradle缓存
org.gradle.caching=true
android.enableBuildCache=true
#开启kotlin的增量和并行编译
kotlin.incremental=true
kotlin.incremental.java=true
kotlin.caching.enabled=true
#开启kotlin并行编译
kotlin.parallel.tasks.in.project=true
#优化kapt
#并行运行kapt1.2.60版本以上支持
kapt.use.worker.api=true
#增量编译 kapt1.3.30版本以上支持
kapt.incremental.apt=true
#kapt avoiding 如果用kapt依赖的内容没有变化会完全重用编译内容省掉app:kaptGenerateStubsDebugKotlin的时间
kapt.include.compile.classpath=false
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -18,7 +41,7 @@ org.gradle.jvmargs=-Xmx4096m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
org.gradle.parallel=true
## maven 配置
RELEASE_REPOSITORY_URL=http://nexus.zhidaoauto.com/repository/maven-releases/