buildscript {
	if (project == rootProject) {
		repositories {
			google()
			mavenCentral()
		}

		dependencies {
			classpath 'com.android.tools.build:gradle:3.5.4'
		}
	}
}

apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
	rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
	compileSdkVersion safeExtGet('compileSdkVersion', 29)
	defaultConfig {
		minSdkVersion safeExtGet('minSdkVersion', 16)
		targetSdkVersion safeExtGet('targetSdkVersion', 29)

	}

	buildTypes {
		release {
			minifyEnabled false
		}
	}

	compileOptions {
		sourceCompatibility JavaVersion.VERSION_1_8
		targetCompatibility JavaVersion.VERSION_1_8
	}
	lint {
		disable 'GradleCompatible'
	}
}

repositories {
	maven {
		// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
		url("$rootDir/../node_modules/react-native/android")
	}
	google()
}

dependencies {
//noinspection GradleDynamicVersion
	implementation "com.facebook.react:react-native:+"  // From node_modules
	implementation "androidx.appcompat:appcompat:${safeExtGet('appCompatVersion', '1.4.1')}"
	implementation "androidx.fragment:fragment:${safeExtGet('appCompatVersion', '1.4.1')}"
}
