diff --git a/.gitignore b/.gitignore index 74eb164a98..2575eddbbc 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,6 @@ build/ .idea/* !.idea/codeStyles/ full/ -debug/ -release/ app/com.crashlytics.settings.json app/session_analytics.tap .project diff --git a/omnipod-dash/src/debug/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt b/omnipod-dash/src/debug/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt new file mode 100644 index 0000000000..689d6a467c --- /dev/null +++ b/omnipod-dash/src/debug/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt @@ -0,0 +1,15 @@ +package info.nightscout.androidaps.plugins.pump.omnipod.dash.annotations + +/** + * This is the actual annotation that makes the class open. Don't use it directly, only through [OpenForTesting] + * which has a NOOP replacement in production. + */ +@Target(AnnotationTarget.ANNOTATION_CLASS) +annotation class OpenClass + +/** + * Annotate a class with [OpenForTesting] if it should be extendable for testing. + */ +@OpenClass +@Target(AnnotationTarget.CLASS) +annotation class OpenForTesting diff --git a/omnipod-dash/src/release/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt b/omnipod-dash/src/release/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt new file mode 100644 index 0000000000..6cf2180e50 --- /dev/null +++ b/omnipod-dash/src/release/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/annotations/OpenForTesting.kt @@ -0,0 +1,8 @@ +package info.nightscout.androidaps.plugins.pump.omnipod.dash.annotations + +/** + * Annotate a class with [OpenForTesting] if it should be extendable for testing. + * In production the class remains final. + */ +@Target(AnnotationTarget.CLASS) +annotation class OpenForTesting