Fixed build error on android (#48)

* Update build.gradle

* Update README.md

* Update README.md
This commit is contained in:
Alireza Hadjar
2022-05-12 11:53:16 +04:30
committed by GitHub
parent 43e30430a7
commit ad0d922ae7
2 changed files with 13 additions and 12 deletions

View File

@@ -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.

View File

@@ -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
}
}
}
}
}