diff --git a/app/build.gradle b/app/build.gradle index 01cdfbcdc0..19b4d87013 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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")) diff --git a/build.gradle b/build.gradle index e4354571d3..0891543e2b 100644 --- a/build.gradle +++ b/build.gradle @@ -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 } diff --git a/gradle.properties b/gradle.properties index 79795072ab..27be743610 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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/