Last active
May 11, 2019 14:23
-
-
Save IvanShafran/00ec6082cf3d8505922daf9f33199ce8 to your computer and use it in GitHub Desktop.
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
public class DependencyChecker { | |
public static void check() throws ClassNotFoundException { | |
try { | |
// Intrinsics exists in all std-lib versions | |
Class.forName("kotlin.jvm.internal.Intrinsics"); | |
} catch (ClassNotFoundException e) { | |
throw new ClassNotFoundException("Library depends on Kotlin std-lib.\n" + | |
"Add to dependencies: org.jetbrains.kotlin:kotlin-stdlib:1.3.31" | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment