Last active
September 11, 2018 22:40
-
-
Save marukami/d1d01d55a614ace4f94ccdaf806059ac to your computer and use it in GitHub Desktop.
kotlin-allopen annotation
This file contains hidden or 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
/** | |
* This annotation allows us to open some classes for mocking purposes while they are final in | |
* release builds. | |
*/ | |
@Target(AnnotationTarget.ANNOTATION_CLASS) | |
annotation class OpenClass | |
/** | |
* Annotate a class with [OpenForTesting] if you want it to be extendable in debug builds. | |
*/ | |
@OpenClass | |
@Target(AnnotationTarget.CLASS) | |
annotation class OpenForTesting | |
// Forked from https://github.com/googlesamples/android-architecture-components/blob/d81da2cb1e3d61e40f052e631bb15883d0f9f637/GithubBrowserSample/app/src/debug/java/com/android/example/github/testing/OpenForTesting.kt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment