1 | buildscript {
|
2 | repositories {
|
3 | jcenter()
|
4 | google()
|
5 | }
|
6 | dependencies {
|
7 | classpath "com.android.tools.build:gradle:3.4.0"
|
8 | }
|
9 | }
|
10 |
|
11 | apply plugin: "com.android.library"
|
12 |
|
13 | def safeExtGet(prop, fallback) {
|
14 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
15 | }
|
16 |
|
17 | def _excludeAppGlideModule = safeExtGet("excludeAppGlideModule", false)
|
18 | def _buildToolsVersion = safeExtGet("buildToolsVersion", "28.0.3")
|
19 | def _compileSdkVersion = safeExtGet("compileSdkVersion", 28)
|
20 | def _glideVersion = safeExtGet("glideVersion", "4.11.0")
|
21 | def _minSdkVersion = safeExtGet("minSdkVersion", 16)
|
22 | def _reactNativeVersion = safeExtGet("reactNative", "+")
|
23 | def _targetSdkVersion = safeExtGet("targetSdkVersion", 28)
|
24 |
|
25 | android {
|
26 | compileSdkVersion _compileSdkVersion
|
27 | buildToolsVersion _buildToolsVersion
|
28 |
|
29 | sourceSets {
|
30 | main {
|
31 | java {
|
32 | if (_excludeAppGlideModule) {
|
33 | srcDir "src"
|
34 | exclude "**/FastImageGlideModule.java"
|
35 | }
|
36 | }
|
37 | }
|
38 | }
|
39 |
|
40 | defaultConfig {
|
41 | minSdkVersion _minSdkVersion
|
42 | targetSdkVersion _targetSdkVersion
|
43 | versionCode 1
|
44 | versionName "1.0"
|
45 | }
|
46 | lintOptions {
|
47 | abortOnError false
|
48 | }
|
49 | }
|
50 |
|
51 | repositories {
|
52 | mavenCentral()
|
53 | google()
|
54 | maven {
|
55 | url "https://maven.google.com"
|
56 | }
|
57 | }
|
58 |
|
59 | dependencies {
|
60 |
|
61 | implementation "com.facebook.react:react-native:${_reactNativeVersion}"
|
62 | implementation "androidx.core:core:1.0.0"
|
63 | implementation "androidx.appcompat:appcompat:1.0.0"
|
64 | implementation "androidx.annotation:annotation:1.0.0"
|
65 | implementation("com.github.bumptech.glide:glide:${_glideVersion}")
|
66 | implementation("com.github.bumptech.glide:annotations:${_glideVersion}")
|
67 | annotationProcessor 'com.android.support:support-annotations:28.0.0-alpha3'
|
68 | annotationProcessor "com.github.bumptech.glide:compiler:${_glideVersion}"
|
69 | implementation("com.github.bumptech.glide:okhttp3-integration:${_glideVersion}")
|
70 | }
|