Skip to content

Instantly share code, notes, and snippets.

@pencilcheck
Created December 20, 2019 01:00
Show Gist options
  • Save pencilcheck/55aacbf0f523119a225fae4c3cf9fdb9 to your computer and use it in GitHub Desktop.
Save pencilcheck/55aacbf0f523119a225fae4c3cf9fdb9 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' } // Gradle Plugin Portal
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.0, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion "${rootProject.ext.buildToolsVersion}"
defaultConfig {
applicationId 'HIDDEN'
targetSdkVersion rootProject.ext.targetSdkVersion
minSdkVersion 21
versionCode 99
versionName "1.15.89"
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Deprecated. Used by net.openid:appauth
manifestPlaceholders = [
'appAuthRedirectScheme': 'host.exp.exponent',
'onesignal_app_id': "app id",
'onesignal_google_project_number': "REMOTE"
]
}
dexOptions {
javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g"
}
signingConfigs {
release {
try {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
catch (ex) {
throw new InvalidUserDataException("You should define KEYSTORE_PASSWORD and KEY_PASSWORD in gradle.properties.")
}
}
debug {
storeFile file('../debug.keystore')
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
signingConfig signingConfigs.release
}
debug {
debuggable true
ext.enableCrashlytics = false
}
}
lintOptions {
abortOnError false
}
// https://badoo.com/techblog/blog/2017/06/30/integration-react-native-in-an-existing-application/
packagingOptions {
pickFirst "**"
//pickFirst '**/libjsc.so'
//pickFirst '**/libc++_shared.so'
//exclude '/lib/mips64/**'
//exclude '/lib/arm64-v8a/**'
//exclude '/lib/x86_64/**'
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
configurations.all {
// OkHttp 3.5.0+ includes the websockets API, so we need this to prevent a conflict
exclude module: 'okhttp-ws'
}
configurations.all {
resolutionStrategy {
force "org.webkit:android-jsc:${rootProject.ext.jscLibVersion}"
// 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: rootProject.ext.jscLibVersion
}
}
}
}
apply from: 'expo.gradle'
apply from: "../../node_modules/react-native-unimodules/gradle.groovy"
/**
* Use international variant JavaScriptCore
* International variant includes ICU i18n library and necessary data allowing to use
* e.g. Date.toLocaleString and String.localeCompare that give correct results
* when using with locales other than en-US.
* Note that this variant is about 6MiB larger per architecture than default.
*/
def useIntlJsc = true
dependencies {
implementation project(':react-native-reanimated')
implementation project(':@sentry_react-native')
implementation project(':react-native-image-picker')
implementation project(':react-native-material-kit')
implementation project(':react-native-billing')
implementation project(':react-native-background-timer')
implementation project(':react-native-onesignal')
implementation project(':react-native-background-fetch')
implementation project(':react-native-background-geolocation')
implementation project(':react-native-device-info')
implementation fileTree(dir: 'libs', include: ['*.jar'])
addUnimodulesDependencies([
modulesPaths : [
'../../node_modules'
],
configuration: 'api',
target : 'react-native',
exclude : [
// You can exclude unneeded modules here, e.g.,
// 'unimodules-face-detector-interface',
// 'expo-face-detector'
// Adding a name here will also remove the package
// from auto-generated BasePackageList.java
]
])
implementation 'com.android.support:multidex:1.0.1'
// Our dependencies from ExpoView
// DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE.
//implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.facebook.android:facebook-android-sdk:4.34.0'
implementation('com.facebook.android:audience-network-sdk:4.99.0') {
exclude module: 'play-services-ads'
}
compileOnly 'org.glassfish:javax.annotation:3.1.1'
implementation 'com.jakewharton:butterknife:8.4.0'
implementation 'de.greenrobot:eventbus:2.4.0'
implementation 'com.amplitude:android-sdk:2.9.2' // Be careful when upgrading! Upgrading might break experience scoping. Check with Jesse. See Analytics.resetAmplitudeDatabaseHelper
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation "com.google.android.gms:play-services-gcm:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-analytics:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-maps:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-auth:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-location:${rootProject.ext.googlePlayServicesVersion}"
implementation "com.google.android.gms:play-services-ads:${rootProject.ext.googlePlayServicesVersion}"
annotationProcessor 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
implementation "com.raizlabs.android:DBFlow-Core:2.2.1"
implementation "com.raizlabs.android:DBFlow:2.2.1"
implementation "com.madgag.spongycastle:core:1.53.0.0"
implementation "com.madgag.spongycastle:prov:1.53.0.0"
debugImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
implementation 'com.facebook.device.yearclass:yearclass:1.0.1'
implementation 'commons-io:commons-io:1.3.2'
implementation 'me.leolin:ShortcutBadger:1.1.4@aar'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.4.7'
implementation 'com.yqritc:android-scalablevideoview:1.0.1'
implementation 'commons-codec:commons-codec:1.10'
implementation 'com.segment.analytics.android:analytics:4.3.0'
implementation 'com.google.zxing:core:3.2.1'
implementation 'net.openid:appauth:0.4.1'
implementation('com.airbnb.android:lottie:2.5.5') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation('io.nlopez.smartlocation:library:3.2.11') {
transitive = false
}
implementation "com.android.support:exifinterface:${rootProject.ext.supportLibVersion}"
implementation 'com.squareup.okio:okio:1.9.0'
implementation "com.android.support:support-annotations:${rootProject.ext.supportLibVersion}"
// Testing
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
// We use a modified build of com.android.support.test:runner:1.0.1. Explanation in maven-test/README
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0'
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.10.19'
testImplementation 'org.robolectric:robolectric:3.8'
testImplementation 'com.android.support.test:runner:1.0.2-alpha1'
testImplementation 'com.android.support.test:rules:1.0.2-alpha1'
implementation('host.exp.exponent:expoview:34.0.0@aar') {
transitive = true
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'
}
api "org.webkit:android-jsc-intl:${rootProject.ext.jscLibVersion}"
api 'com.facebook.react:react-native:34.0.0'
/* REMOVED_WHEN_DISTRIBUTING_FROM_HERE
implementation(project(path: ':expoview')) {
// Excluding okhttp3 included by expo-file-system
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection'
}
REMOVED_WHEN_DISTRIBUTING_TO_HERE */
}
// This has to be down here for some reason
apply plugin: 'com.google.gms.google-services'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment