From c81e1a34118231eca1b92728a30e65a4c1d661ea Mon Sep 17 00:00:00 2001 From: rougsig Date: Mon, 27 Jun 2022 00:30:02 +0300 Subject: [PATCH] Disable gradle daemon for android gradle test runner --- .../google/protobuf/gradle/ProtobufPluginTestHelper.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/groovy/com/google/protobuf/gradle/ProtobufPluginTestHelper.groovy b/src/test/groovy/com/google/protobuf/gradle/ProtobufPluginTestHelper.groovy index 82d79ba2..2c00a77b 100644 --- a/src/test/groovy/com/google/protobuf/gradle/ProtobufPluginTestHelper.groovy +++ b/src/test/groovy/com/google/protobuf/gradle/ProtobufPluginTestHelper.groovy @@ -66,6 +66,10 @@ final class ProtobufPluginTestHelper { // // Set memory limit for all gradle build, not only for dexing args.add("-Porg.gradle.jvmargs=-Xmx2048m") + // Disable daemon to safe memory + // Each gradle version run daemon, which use a bit of ram. + // After running 4 different versions of Gradle ram will run out. + args.add("-Porg.gradle.daemon=false") return GradleRunner.create() .withProjectDir(mainProjectDir) .withArguments(args)