Skip to content

Commit

Permalink
Merge pull request #12 from wordpress-mobile/upgrade-to-gradle-7.1.1
Browse files Browse the repository at this point in the history
Upgrade to gradle 7.1.1
  • Loading branch information
oguzkocer authored Aug 16, 2021
2 parents c12d84e + eddce07 commit 8a286f6
Show file tree
Hide file tree
Showing 11 changed files with 89 additions and 66 deletions.
64 changes: 31 additions & 33 deletions android-exoplayer/build.gradle
Original file line number Diff line number Diff line change
@@ -1,60 +1,47 @@
apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

buildscript {
repositories {
google()
jcenter()
}

dependencies {
//noinspection GradleDependency
classpath rootProject.ext.has('gradleBuildTools') ? rootProject.ext.get('gradleBuildTools') : 'com.android.tools.build:gradle:3.3.1'
}
plugins {
id "com.android.library"
id "maven-publish"
}

android {
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')

compileSdkVersion 30

compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
ndk {
minSdkVersion 21
targetSdkVersion 30
ndk {
abiFilters "armeabi-v7a", "x86"
}

}
}

repositories {
mavenLocal()
google()
jcenter()
if (project == rootProject) {
maven {
url "https://dl.bintray.com/wordpress-mobile/react-native-mirror/"
}
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}

google()
mavenCentral()
jcenter()
}

dependencies {

implementation 'com.facebook.react:react-native:0.64.0'
if (project == rootProject) {
// If this is the root project (e.g. Jitpack), specify a version
implementation 'com.facebook.react:react-native:0.64.0'
} else {
//noinspection GradleDynamicVersion
api "com.facebook.react:react-native:+"
}

implementation('com.google.android.exoplayer:exoplayer:2.9.3') {
exclude group: 'com.android.support'
Expand All @@ -69,5 +56,16 @@ dependencies {
exclude group: 'com.squareup.okhttp3', module: 'okhttp'
}
implementation 'com.squareup.okhttp3:okhttp:3.12.1'
}

afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
groupId = 'com.github.wordpress-mobile'
artifactId = 'react-native-video'
}
}
}
}
7 changes: 7 additions & 0 deletions android-exoplayer/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

android.useAndroidX=true
android.enableJetifier=true
Binary file modified android-exoplayer/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions android-exoplayer/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Apr 18 13:05:46 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
9 changes: 9 additions & 0 deletions android-exoplayer/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pluginManagement {
plugins {
id("com.android.library") version "4.2.2"
}
repositories {
gradlePluginPortal()
google()
}
}
50 changes: 21 additions & 29 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,41 @@
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
plugins {
id "com.android.library"
}

buildscript {
repositories {
google()
jcenter()
}

dependencies {
//noinspection GradleDependency
classpath rootProject.ext.has('gradleBuildTools') ? rootProject.ext.get('gradleBuildTools') : 'com.android.tools.build:gradle:3.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

android {
compileSdkVersion safeExtGet('compileSdkVersion', 28)
buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3')
compileSdkVersion 30

defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)
versionCode 1
versionName "1.0"
minSdkVersion 21
targetSdkVersion 30
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
}

repositories {
mavenLocal()
if (project == rootProject) {
maven { url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror" }
} else {
// When building as a dep, the RN's maven repo is locally in the node_modules folder
def nodeModulesPath = "${project.buildDir}/../../node_modules/"
maven { url "${nodeModulesPath}/react-native/android" }
}

google()
mavenCentral()
jcenter()
maven {
url "https://a8c-libs.s3.amazonaws.com/android/react-native-mirror"
}
}

dependencies {
implementation 'com.facebook.react:react-native:0.64.0'
if (project == rootProject) {
// If this is the root project (e.g. Jitpack), specify a version
implementation 'com.facebook.react:react-native:0.64.0'
} else {
//noinspection GradleDynamicVersion
api "com.facebook.react:react-native:+"
}

implementation 'com.yqritc:android-scalablevideoview:1.0.4'
}
7 changes: 7 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true

android.useAndroidX=true
android.enableJetifier=true
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Thu Apr 18 13:05:46 EDT 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
10 changes: 10 additions & 0 deletions android/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pluginManagement {
plugins {
id("com.android.library") version "4.2.2"
}
repositories {
gradlePluginPortal()
google()
}
}

2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install:
- cd android-exoplayer && ./gradlew publishToMavenLocal

0 comments on commit 8a286f6

Please sign in to comment.