Skip to content

Instantly share code, notes, and snippets.

@pencilcheck
Created March 22, 2018 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pencilcheck/d4cf17590430ec639db596e41c36d831 to your computer and use it in GitHub Desktop.
Save pencilcheck/d4cf17590430ec639db596e41c36d831 to your computer and use it in GitHub Desktop.
apply plugin: 'com.android.application'
ext {
supportlib_version = '23.3.0'
}
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "$supportlib_version"
}
if (details.requested.group == 'com.android.gms' ) {
details.useVersion "$rootProject.googlePlayServicesVersion"
}
}
}
}
configurations.all {
resolutionStrategy {
// force certain versions of dependencies (including transitive)
force 'com.squareup.okhttp3:okhttp:3.4.1'
force 'org.webkit:android-jsc:r216113'
// force intl version of android-jsc
eachDependency { DependencyResolveDetails details ->
if (details.requested.name == 'android-jsc') {
details.useTarget group: details.requested.group, name: 'android-jsc-intl', version: 'r216113'
}
}
}
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
packagingOptions {
pickFirst 'META-INF/LICENSE'
}
defaultConfig {
applicationId "com.application"
minSdkVersion 19
targetSdkVersion 23
versionCode 59
versionName "1.15.29"
multiDexEnabled true
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
manifestPlaceholders = [
'appAuthRedirectScheme': 'com.application',
'onesignal_app_id': "XXXXXX",
'onesignal_google_project_number': "XXXX"
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
dexOptions {
javaMaxHeapSize "8g"
}
}
task exponentPrebuildStep(type: Exec) {
workingDir '../../'
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', '.\\.expo-source\\android\\detach-scripts\\prepare-detached-build.bat'
} else {
commandLine './.expo-source/android/detach-scripts/prepare-detached-build.sh'
}
}
preBuild.dependsOn exponentPrebuildStep
repositories{
flatDir{
dirs '../../node_modules/react-native-background-geolocation/android/libs'
}
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile project(':react-native-billing')
compile (project(':react-native-background-timer')) {
exclude group: 'com.google.android.gms'
}
compile (project(':react-native-device-info')) {
exclude group: 'com.google.android.gms'
}
compile (project(':react-native-onesignal')) {
exclude group: 'com.google.android.gms'
}
compile (project(':react-native-background-geolocation')) {
exclude group: 'com.google.android.gms'
}
compile (name: 'tslocationmanager', ext: 'aar')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile ("com.android.support:appcompat-v7:$supportlib_version") {
force = true;
}
compile ("com.android.support:mediarouter-v7:$supportlib_version") {
force = true;
}
compile ("com.android.support:recyclerview-v7:$supportlib_version") {
force = true;
}
compile ("com.android.support:palette-v7:$supportlib_version") {
force = true;
}
compile ("com.android.support:customtabs:$supportlib_version") {
force = true;
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.parse.bolts:bolts-android:1.1.3'
compile ("com.google.android.gms:play-services:$rootProject.googlePlayServicesVersion") {
force = true;
}
compile ("com.google.firebase:firebase-core:11.6.2") {
exclude group: 'com.google.android.gms'
force = true;
}
compile('host.exp.exponent:expoview:21.0.0@aar') {
exclude group: 'com.facebook.android', module: 'facebook-android-sdk'
exclude group: 'com.facebook.android', module: 'audience-network-sdk'
exclude group: 'com.google.android.gms'
exclude group: 'io.nlopez.smartlocation', module: 'library'
transitive = true;
}
compile ('com.facebook.android:facebook-android-sdk:4.+') {
//exclude module: 'bolts-android'
exclude group: 'com.google.android.gms'
}
compile('com.facebook.android:audience-network-sdk:4.+') {
exclude module: 'play-services-ads'
exclude group: 'com.google.android.gms'
}
compile('io.nlopez.smartlocation:library:3.2.11') {
exclude group: 'com.google.android.gms'
transitive = false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment