buildscript { // Simple helper that allows the root project to override versions declared by this library. ext.safeExtGet = { prop, fallback -> rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback } repositories { google() mavenCentral() } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}") } } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { compileSdkVersion safeExtGet("compileSdkVersion", 33) compileOptions { sourceCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { jvmTarget = JavaVersion.VERSION_11.majorVersion } defaultConfig { applicationId 'host.exp.exponent' minSdkVersion safeExtGet("minSdkVersion", 21) targetSdkVersion safeExtGet("targetSdkVersion", 31) // ADD VERSIONS HERE // BEGIN VERSIONS versionCode 175 versionName '2.26.0' // END VERSIONS multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" // Deprecated. Used by net.openid:appauth manifestPlaceholders = [ 'appAuthRedirectScheme': 'host.exp.exponent' ] } dexOptions { javaMaxHeapSize System.getenv("DISABLE_DEX_MAX_HEAP") ? null : "8g" } signingConfigs { debug { storeFile file('../debug.keystore') } release { storeFile file(System.getenv("ANDROID_KEYSTORE_PATH") ?: "release-key.jks") storePassword System.getenv("ANDROID_KEYSTORE_PASSWORD") keyAlias System.getenv("ANDROID_KEY_ALIAS") keyPassword System.getenv("ANDROID_KEY_PASSWORD") } } buildTypes { debug { debuggable true } release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' consumerProguardFiles 'proguard-rules.pro' if (!System.getenv("ANDROID_UNSIGNED")) { signingConfig signingConfigs.release } } } // WHEN_DISTRIBUTING_REMOVE_FROM_HERE // WHEN_PREPARING_SHELL_REMOVE_FROM_HERE flavorDimensions "versioning" productFlavors { versioned { dimension "versioning" manifestPlaceholders = [appLabel:"@string/versioned_app_name"] } unversioned { dimension "versioning" getIsDefault().set(true) manifestPlaceholders = [appLabel: "@string/unversioned_app_name"] } } // WHEN_PREPARING_SHELL_REMOVE_TO_HERE // WHEN_DISTRIBUTING_REMOVE_TO_HERE // `productFlavors` must be defined before this block defaultConfig { if (android.productFlavors.empty) { // when preparing shell app, the above flavor declarations are removed // this falls back :expoview to versioned flavor missingDimensionStrategy 'versioning', 'versioned' manifestPlaceholders = [appLabel:"@string/versioned_app_name"] } } lintOptions { abortOnError false } packagingOptions { // libfbjni.so is prebuilt library shared between all ABIs pickFirst "lib/**/libfbjni.so" } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.multidex:multidex:2.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.6.10')}" // Our dependencies implementation ('androidx.appcompat:appcompat:1.4.1') // Our dependencies from ExpoView // DON'T ADD ANYTHING HERE THAT ISN'T IN EXPOVIEW. ONLY COPY THINGS FROM EXPOVIEW TO HERE. implementation ('androidx.appcompat:appcompat:1.4.1') compileOnly 'org.glassfish:javax.annotation:3.1.1' implementation 'com.jakewharton:butterknife:10.2.1' implementation 'de.greenrobot:eventbus:2.4.0' implementation 'com.squareup.picasso:picasso:2.5.2' implementation 'com.google.android.gms:play-services-analytics:16.0.1' implementation 'com.google.android.gms:play-services-maps:18.0.0' implementation 'com.google.android.gms:play-services-auth:15.0.1' implementation 'com.google.android.gms:play-services-location:15.0.1' 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:2.1.0' implementation 'commons-io:commons-io:1.4' implementation 'me.leolin:ShortcutBadger:1.1.4@aar' implementation 'com.github.CanHub:Android-Image-Cropper:1.1.1' implementation 'commons-codec:commons-codec:1.10' implementation 'com.google.zxing:core:3.3.3' implementation 'net.openid:appauth:0.4.1' implementation 'com.airbnb.android:lottie:3.4.0' implementation('io.nlopez.smartlocation:library:3.2.11') { transitive = false } implementation "androidx.exifinterface:exifinterface:1.0.0" implementation 'com.squareup.okio:okio:1.9.0' implementation 'com.facebook.soloader:soloader:0.8.2' implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' // expo-file-system implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0' // Testing androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation "androidx.annotation:annotation:1.3.0" androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.0' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' androidTestImplementation 'com.azimolabs.conditionwatcher:conditionwatcher:0.2' androidTestImplementation 'junit:junit:4.12' androidTestImplementation 'org.mockito:mockito-core:1.10.19' testImplementation 'org.robolectric:robolectric:3.8' androidTestImplementation 'androidx.test:runner:1.4.0' androidTestImplementation 'androidx.test:rules:1.4.0' testImplementation 'androidx.test:runner:1.4.0' testImplementation 'androidx.test:rules:1.4.0' testImplementation 'junit:junit:4.12' testImplementation 'org.mockito:mockito-core:1.10.19' /* UNCOMMENT WHEN DISTRIBUTING implementation('host.exp.exponent:expoview:45.0.0@aar') { transitive = true exclude group: 'com.squareup.okhttp3', module: 'okhttp' exclude group: 'com.squareup.okhttp3', module: 'okhttp-urlconnection' } END UNCOMMENT WHEN DISTRIBUTING */ // WHEN_DISTRIBUTING_REMOVE_FROM_HERE // BEGIN_SDK_UNVERSIONED implementation(project(':expoview')) implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava' // END_SDK_UNVERSIONED // WHEN_PREPARING_SHELL_REMOVE_FROM_HERE // ADD_NEW_SDKS_HERE // BEGIN_SDK_47 versionedImplementation(project(':expoview-abi47_0_0')) // END_SDK_47 // BEGIN_SDK_46 versionedImplementation(project(':expoview-abi46_0_0')) // END_SDK_46 // BEGIN_SDK_45 versionedImplementation(project(':expoview-abi45_0_0')) // END_SDK_45 // This is not needed in shell apps, the Amplitude module will include this dep if installed implementation 'com.amplitude:android-sdk:2.23.2' // WHEN_PREPARING_SHELL_REMOVE_TO_HERE // WHEN_DISTRIBUTING_REMOVE_TO_HERE /* UNCOMMENT WHEN DISTRIBUTING api 'org.webkit:android-jsc:r250230' // needs to be before react-native api 'com.facebook.react:react-native:+' END UNCOMMENT WHEN DISTRIBUTING */ // WHEN_DETACHING_REMOVE_FROM_HERE /* UNCOMMENT WHEN DISTRIBUTING implementation project(':expo') implementation 'host.exp.exponent:expo-random:+' END UNCOMMENT WHEN DISTRIBUTING */ // WHEN_DETACHING_REMOVE_TO_HERE } // This has to be down here for some reason apply plugin: 'com.google.gms.google-services'