# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# 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
org.gradle.parallel=true

org.gradle.configureondemand=true
org.gradle.caching=true

# Enable D8 desugar / R8
android.enableD8.desugaring=true
android.enableR8=true

# AndroidX
android.useAndroidX=true
android.enableJetifier=true

# Enable Robolectric to use the same resources as Android
android.enableUnitTestBinaryResources=true
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# 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
org.gradle.parallel=true

org.gradle.configureondemand=true
org.gradle.caching=true

# Enable D8 desugar / R8
android.enableD8.desugaring=true
android.enableR8=true

# AndroidX
android.useAndroidX=true
android.enableJetifier=true

# Enable Robolectric to use the same resources as Android
android.enableUnitTestBinaryResources=true

# The default memory is 512m
org.gradle.jvmargs=-Xmx1g

Fix OutOfMemoryError when building the first time
Fix OutOfMemoryError when building the first time

Gradle 5.0 change the default memory from 1g to 512m. This caused failed build with `OutOfMemoryError: GC overhead limit exceeded` error. Setting back the memory to 1g fix this issue. See https://github.com/gradle/gradle/issues/7746#issuecomment-439137327