mirror of
https://github.com/zhigang1992/react-native-video-cache.git
synced 2026-01-12 16:42:21 +08:00
Fixed build error on android (#48)
* Update build.gradle * Update README.md * Update README.md
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# react-native-video-cache
|
||||
|
||||
* Fixed its android conflict with react native v0.67 (gradle > 0.7)
|
||||
|
||||
Boost performance on online video loading and caching
|
||||
|
||||
Use following libraries to do the heavy lifting.
|
||||
|
||||
@@ -20,7 +20,7 @@ def safeExtGet(prop, fallback) {
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
buildscript {
|
||||
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
||||
@@ -39,7 +39,7 @@ buildscript {
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
android {
|
||||
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
||||
@@ -120,7 +120,7 @@ afterEvaluate { project ->
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
archiveClassifier = 'sources'
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
include '**/*.java'
|
||||
}
|
||||
@@ -134,17 +134,16 @@ afterEvaluate { project ->
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives androidSourcesJar
|
||||
archives androidJavadocJar
|
||||
}
|
||||
|
||||
task installArchives(type: Upload) {
|
||||
configuration = configurations.archives
|
||||
repositories.mavenDeployer {
|
||||
// Deploy to react-native-event-bridge/maven, ready to publish to npm
|
||||
repository url: "file://${projectDir}/../android/maven"
|
||||
configureReactNativePom pom
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
artifact androidSourcesJar
|
||||
artifact androidJavadocJar
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user