improved gradle compatibility