aboutsummaryrefslogtreecommitdiff
path: root/buildSrc
diff options
context:
space:
mode:
authorChristian Williams <christianw@google.com>2017-10-30 17:39:24 -0700
committerChristian Williams <christianw@google.com>2017-10-30 18:54:07 -0700
commit1615c48b7776f85a81cd46b95e4ac02fd8e0ef63 (patch)
tree737c174e2649285cbb689a3f908af4ed63ac95c1 /buildSrc
parent25e473285377938907eb32d5a1d5dd8dc6f9363c (diff)
downloadrobolectric-shadows-1615c48b7776f85a81cd46b95e4ac02fd8e0ef63.tar.gz
Parallelize tests, fix snapshot upload.
Diffstat (limited to 'buildSrc')
-rw-r--r--buildSrc/src/main/groovy/RoboJavaModulePlugin.groovy8
1 files changed, 6 insertions, 2 deletions
diff --git a/buildSrc/src/main/groovy/RoboJavaModulePlugin.groovy b/buildSrc/src/main/groovy/RoboJavaModulePlugin.groovy
index fa7856371..32380d743 100644
--- a/buildSrc/src/main/groovy/RoboJavaModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/RoboJavaModulePlugin.groovy
@@ -63,6 +63,10 @@ class RoboJavaModulePlugin implements Plugin<Project> {
minHeapSize = "1024m"
maxHeapSize = "3172m"
+ if (System.env['GRADLE_MAX_PARALLEL_FORKS'] != null) {
+ maxParallelForks = Integer.parseInt(System.env['GRADLE_MAX_PARALLEL_FORKS'])
+ }
+
def forwardedSystemProperties = System.properties
.findAll { k,v -> k.startsWith("robolectric.") }
.collect { k,v -> "-D$k=$v" }
@@ -153,8 +157,8 @@ class RoboJavaModulePlugin implements Plugin<Project> {
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
repository(url: url) {
authentication(
- userName: System.properties["sonatype-login"],
- password: System.properties["sonatype-password"]
+ userName: System.properties["sonatype-login"] || System.env['sonatypeLogin'],
+ password: System.properties["sonatype-password"] || System.env['sonatypePassword']
)
}