diff --git a/.circleci/config.yml b/.circleci/config.yml index 50ec7dcb5e2d..67f3829618a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,10 @@ android_config: &android_config docker: - image: circleci/android:api-27-alpha environment: - GRADLE: "./gradlew --build-cache --stacktrace -PdisablePreDex -PjavaMaxHeapSize=2g" + # kotlin.incremental=false and kotlin.compiler.execution.strategy=in-process are required due to an issue with the Kotlin compiler in + # memory constrained environments: https://youtrack.jetbrains.com/issue/KT-15562 + GRADLE_OPTS: -Xmx1536m -XX:+HeapDumpOnOutOfMemoryError -Dkotlin.compiler.execution.strategy=in-process -Dkotlin.incremental=false + GRADLEW: "./gradlew --stacktrace --no-parallel --build-cache --configure-on-demand -PdisablePreDex -PjavaMaxHeapSize=1536m" copy_gradle_properties: ©_gradle_properties run: @@ -26,7 +29,7 @@ jobs: command: ./tools/validate-login-strings.sh - run: name: Test - command: $GRADLE testVanillaRelease + command: $GRADLEW testVanillaRelease - save_cache: paths: - ~/.gradle @@ -45,13 +48,13 @@ jobs: - <<: *copy_gradle_properties - run: name: Checkstyle - command: $GRADLE checkstyle + command: $GRADLEW checkstyle - run: name: ktlint - command: $GRADLE ktlint + command: $GRADLEW ktlint - run: name: Lint - command: $GRADLE lintVanillaRelease || (grep -A20 -B2 'severity="Error"' -r --include="*.xml" WordPress libs; exit 1) + command: $GRADLEW lintVanillaRelease || (grep -A20 -B2 'severity="Error"' -r --include="*.xml" WordPress libs; exit 1) - save_cache: paths: - ~/.gradle