Skip to content

Instantly share code, notes, and snippets.

@IvanShafran
Last active May 11, 2019 14:23
Show Gist options
  • Save IvanShafran/00ec6082cf3d8505922daf9f33199ce8 to your computer and use it in GitHub Desktop.
Save IvanShafran/00ec6082cf3d8505922daf9f33199ce8 to your computer and use it in GitHub Desktop.
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