Skip to content

Instantly share code, notes, and snippets.

@dleppik dleppik/gradle
Last active Jul 31, 2017

What would you like to do?
Gradle configuration for EgTest
plugins {
id "net.ltgt.apt" version "0.9" // Annotation processing for non-Android projects
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
dependencies {
apt 'com.vocalabs:egtest-processor:0.3.0' // change apt to annotationProcessor if compiling for Android
compileOnly 'com.vocalabs:egtest-annotations:0.3.0'
testCompile 'junit:junit:4.12'
compileJava.options.compilerArgs.add("-Aegtest.targetDirectory=$buildDir/generated/egTest") // Specify output directory
// Uncomment if you want to write your examples in Groovy
// compileJava.options.compilerArgs.add("-Aegtest.targetLanguage=GROOVY")
// Uncomment if your Java compiles alongside Scala. Sadly, this won't let you use EgTest within Scala source code.
// compileScala.options.compilerArgs.add("-Aegtest.targetDirectory=$buildDir/generated/egTest")
sourceSets {
test {
java {
srcDir 'build/generated/egTest' // Generate tests using output directory specified above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.