Last active
July 31, 2017 21:13
-
-
Save dleppik/260d978bf4dcb023bb3218c051653a6c to your computer and use it in GitHub Desktop.
Gradle configuration for EgTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "net.ltgt.apt" version "0.9" // Annotation processing for non-Android projects | |
} | |
apply plugin: 'java' | |
sourceCompatibility = 1.8 | |
repositories { | |
mavenCentral() | |
} | |
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