Skip to content

Commit

Permalink
Add parallel task
Browse files Browse the repository at this point in the history
  • Loading branch information
Pluu committed Apr 10, 2024
1 parent ddd3bf2 commit 20a0c2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ org.gradle.jvmargs=-Xmx2048m -XX:+UseParallelGC -Dfile.encoding=UTF-8
# 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.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
org.gradle.configuration-cache=true
org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
6 changes: 6 additions & 0 deletions lint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ jar {
attributes 'Manifest-Version': 1.0
attributes("Lint-Registry-v2": "com.pluu.lint.MyIssueRegistry")
}
}

test {
// https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:maxParallelForks
def forkCounts = (Runtime.getRuntime().availableProcessors() / 2).intValue()
maxParallelForks = Math.max(1, forkCounts)
}

0 comments on commit 20a0c2d

Please sign in to comment.