apply plugin: 'com.android.library' def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } android { compileSdkVersion safeExtGet('compileSdkVersion', 27) buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3') defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 16) targetSdkVersion safeExtGet('targetSdkVersion', 27) versionCode 1 versionName "1.0" } } dependencies { //noinspection GradleDynamicVersion provided "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}" compile 'com.google.android.exoplayer:exoplayer:2.7.3' compile('com.google.android.exoplayer:extension-okhttp:2.7.3') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' } compile 'com.squareup.okhttp3:okhttp:3.9.1' }