Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing build.gradle and make dependency versions safer #536

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
buildscript {
// The Android Gradle plugin is only required when opening the android folder stand-alone.
// This avoids unnecessary downloads and potential conflicts when the library is included as a
// module dependency in an application project.
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
if (project == rootProject) {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
}
}
repositories {
mavenCentral()
}
}

apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
Expand All @@ -22,5 +41,5 @@ android {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation 'com.google.android.gms:play-services-ads:+'
implementation "com.google.android.gms:play-services-ads:${safeExtGet('googlePlayServicesAdsVersion', '19.+')}"
}