forked from DylanVann/react-native-fast-image
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df37c4f
commit 1f04c55
Showing
2 changed files
with
43 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,68 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
google() | ||
} | ||
dependencies { | ||
classpath "com.android.tools.build:gradle:3.4.0" | ||
} | ||
} | ||
|
||
apply plugin: "com.android.library" | ||
|
||
def safeExtGet(prop, fallback) { | ||
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback | ||
} | ||
|
||
def _excludeAppGlideModule = safeExtGet("excludeAppGlideModule", false) | ||
def _buildToolsVersion = safeExtGet("buildToolsVersion", "28.0.3") | ||
def _compileSdkVersion = safeExtGet("compileSdkVersion", 28) | ||
def _glideVersion = safeExtGet("glideVersion", "4.11.0") | ||
def _minSdkVersion = safeExtGet("minSdkVersion", 16) | ||
def _reactNativeVersion = safeExtGet("reactNative", "+") | ||
def _targetSdkVersion = safeExtGet("targetSdkVersion", 28) | ||
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. | ||
if (project == rootProject) { | ||
repositories { | ||
google() | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:3.5.3' | ||
} | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion _compileSdkVersion | ||
buildToolsVersion _buildToolsVersion | ||
|
||
compileSdkVersion safeExtGet('compileSdkVersion', 28) | ||
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') | ||
defaultConfig { | ||
minSdkVersion safeExtGet('minSdkVersion', 16) | ||
targetSdkVersion safeExtGet('targetSdkVersion', 28) | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
sourceSets { | ||
main { | ||
java { | ||
if (_excludeAppGlideModule) { | ||
if (safeExtGet('excludeAppGlideModule', false)) { | ||
srcDir "src" | ||
exclude "**/FastImageGlideModule.java" | ||
} | ||
} | ||
} | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion _minSdkVersion | ||
targetSdkVersion _targetSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
google() | ||
mavenLocal() | ||
maven { | ||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
url "$rootDir/../node_modules/react-native/android" | ||
} | ||
maven { | ||
url "https://maven.google.com" | ||
// Android JSC is installed from npm | ||
url "$rootDir/../node_modules/jsc-android/dist" | ||
} | ||
google() | ||
jcenter() | ||
} | ||
|
||
def glideVersion = safeExtGet('glideVersion', '4.11.0') | ||
|
||
dependencies { | ||
//noinspection GradleDynamicVersion | ||
implementation "com.facebook.react:react-native:${_reactNativeVersion}" | ||
implementation "androidx.core:core:1.0.0" | ||
implementation "androidx.appcompat:appcompat:1.0.0" | ||
implementation "androidx.annotation:annotation:1.0.0" | ||
implementation("com.github.bumptech.glide:glide:${_glideVersion}") | ||
implementation("com.github.bumptech.glide:annotations:${_glideVersion}") | ||
annotationProcessor 'com.android.support:support-annotations:28.0.0-alpha3' | ||
annotationProcessor "com.github.bumptech.glide:compiler:${_glideVersion}" | ||
implementation("com.github.bumptech.glide:okhttp3-integration:${_glideVersion}") | ||
implementation 'com.facebook.react:react-native:+' // From node_modules | ||
implementation "com.github.bumptech.glide:glide:${glideVersion}" | ||
implementation "com.github.bumptech.glide:okhttp3-integration:${glideVersion}" | ||
annotationProcessor "com.github.bumptech.glide:compiler:${glideVersion}" | ||
} |
5 changes: 3 additions & 2 deletions
5
android/src/main/java/com/dylanvann/fastimage/FastImageViewWithUrl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters