| buildscript { |
| repositories { jcenter() } |
| |
| dependencies { |
| classpath 'com.netflix.nebula:gradle-aggregate-javadocs-plugin:2.2.+' |
| classpath 'ch.raffael.pegdown-doclet:pegdown-doclet:1.3' |
| } |
| } |
| |
| plugins { |
| id "net.ltgt.apt" version "0.12" // automatic annotation processing |
| } |
| |
| allprojects { |
| repositories { |
| mavenLocal() |
| jcenter() |
| } |
| |
| group = "org.robolectric" |
| version = thisVersion |
| } |
| |
| apply plugin: 'idea' |
| apply plugin: 'net.ltgt.apt-idea' |
| |
| idea { |
| project { |
| // experimental: whether annotation processing will be configured in the IDE; only actually used with the 'idea' task. |
| configureAnnotationProcessing = true |
| } |
| } |
| |
| apply plugin: 'nebula-aggregate-javadocs' |
| apply plugin: 'ch.raffael.pegdown-doclet' |
| |
| rootProject.gradle.projectsEvaluated { |
| rootProject.tasks['aggregateJavadocs'].failOnError = false |
| } |
| |
| task aggregateTestReports(type: TestReport) { |
| def jobNumber = System.getenv('TRAVIS_JOB_NUMBER') |
| if (jobNumber == null) { |
| destinationDir = file("$buildDir/reports/allTests") |
| } else { |
| destinationDir = file("$buildDir/reports/allTests/$jobNumber") |
| } |
| } |
| |
| task prefetchSdks() { |
| def sdkConfigurations = [] |
| AndroidSdk.ALL_SDKS.each { androidSdk -> |
| sdkConfigurations << configurations.create("sdk${androidSdk.apiLevel}") |
| dependencies.add("sdk${androidSdk.apiLevel}", androidSdk.coordinates) |
| } |
| } |
| |
| task prefetchDependencies(dependsOn: allprojects.collect { p -> "${p.path}:dependencies" }) { |
| dependsOn "prefetchSdks" |
| } |
| |
| // for use of external initialization scripts... |
| project.ext.allSdks = AndroidSdk.ALL_SDKS |