From 4bd1afc6a15e336d2d953f027b6cd4af4bde91cf Mon Sep 17 00:00:00 2001 From: shisheng-1 <240274530@qq.com> Date: Sat, 13 Nov 2021 03:21:26 +0800 Subject: [PATCH] Improve GRADLE build Performance --- build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8fd2d8f28..ac59d547f 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,14 @@ buildscript { } allprojects { + tasks.withType(Test).configureEach { + maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1 + if (!project.hasProperty("createReports")) { + reports.html.required = false + reports.junitXml.required = false + } + } + repositories { google() jcenter() @@ -19,4 +27,4 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir -} +} \ No newline at end of file