Move to static method and fix check for gradle-android-plugion 0.9.x