
org.robolectric.gradle.RobolectricTestExtension.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of robolectric-gradle-plugin Show documentation
Show all versions of robolectric-gradle-plugin Show documentation
A custom robolectric plugin that gives full control on Gradle Test.
package org.robolectric.gradle
class RobolectricTestExtension {
private String maxHeapSize
private final List includePatterns = new LinkedList<>()
private final List excludePatterns = new LinkedList<>()
private final List excludeVariants = new LinkedList<>()
private boolean ignoreFailures
private Closure afterTest
String getMaxHeapSize() {
return maxHeapSize
}
void setAfterTest(Closure afterTest) {
this.afterTest = afterTest
}
Closure getAfterTest() {
return this.afterTest
}
void setMaxHeapSize(String maxHeapSize) {
this.maxHeapSize = maxHeapSize
}
List getIncludePatterns() {
return this.includePatterns
}
List getExcludeVariants() {
return this.excludeVariants
}
void excludeVariant(String variantName) {
this.excludeVariants.add variantName
}
void include(String includePattern) {
this.includePatterns.add includePattern
}
List getExcludePatterns() {
return this.excludePatterns
}
void exclude(String excludePattern) {
this.excludePatterns.add excludePattern
}
boolean getIgnoreFailures() {
return this.ignoreFailures;
}
void ignoreFailures(boolean ignoreFailures) {
this.ignoreFailures = ignoreFailures;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy