Last active
December 12, 2017 01:31
-
-
Save koral--/f99d64c72741c29431ce4e15c0e5b6d7 to your computer and use it in GitHub Desktop.
testApt to testAnnotationProcessor migration, workaround for issue: https://code.google.com/p/android/issues/detail?id=224272
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
android.applicationVariants.all { | |
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}") | |
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir) | |
} |
For Library modules, the config is
android {
defaultConfig {
android.libraryVariants.all {
def aptOutputDir = new File(buildDir, "generated/source/apt/${it.unitTestVariant.dirName}")
it.unitTestVariant.addJavaSourceFoldersToModel(aptOutputDir)
}
}
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also marked as resolved, this is still an issue as of: gradle:2.2.2 & gradle:2.3.0-alpha2