From a203aeadea43d5f769ae65ef9e8d25df3cf30a05 Mon Sep 17 00:00:00 2001 From: vok Date: Fri, 21 Jun 2019 09:32:51 +0700 Subject: [PATCH] pre androidX, upgrade to 28 --- README.md | 11 +---------- android-exoplayer/build.gradle | 9 +++------ .../java/com/brentvatne/exoplayer/ExoPlayerView.java | 2 +- .../java/com/brentvatne/exoplayer/ResizeMode.java | 2 +- .../com/brentvatne/exoplayer/VideoEventEmitter.java | 2 +- examples/basic/android/app/build.gradle | 3 +-- examples/basic/android/gradle.properties | 2 -- 7 files changed, 8 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 87b7914a..1e70497f 100644 --- a/README.md +++ b/README.md @@ -125,19 +125,10 @@ project(':react-native-video').projectDir = new File(rootProject.projectDir, '.. dependencies { ... compile project(':react-native-video') -+ implementation "androidx.appcompat:appcompat:1.0.0" -- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" + implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" } ``` -**android/gradle.properties** - -Migrating to AndroidX: - -```gradle.properties -android.useAndroidX=true -android.enableJetifier=true -``` **MainApplication.java** diff --git a/android-exoplayer/build.gradle b/android-exoplayer/build.gradle index 9f4b7f10..49f9f216 100644 --- a/android-exoplayer/build.gradle +++ b/android-exoplayer/build.gradle @@ -28,12 +28,9 @@ dependencies { } // All support libs must use the same version - // implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '+')}" - implementation "androidx.annotation:annotation:1.0.0" - // implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '+')}" - implementation "androidx.core:core:1.0.0" - // implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '+')}" - implementation "androidx.media:media:1.0.0" + implementation "com.android.support:support-annotations:${safeExtGet('supportLibVersion', '28.0.0')}" + implementation "com.android.support:support-compat:${safeExtGet('supportLibVersion', '28.0.0')}" + implementation "com.android.support:support-media-compat:${safeExtGet('supportLibVersion', '28.0.0')}" implementation('com.google.android.exoplayer:extension-okhttp:2.9.3') { exclude group: 'com.squareup.okhttp3', module: 'okhttp' diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java index 9f3d09be..fc966005 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ExoPlayerView.java @@ -2,7 +2,7 @@ package com.brentvatne.exoplayer; import android.annotation.TargetApi; import android.content.Context; -import androidx.core.content.ContextCompat; +import android.support.v4.content.ContextCompat; import android.util.AttributeSet; import android.util.Log; import android.view.Gravity; diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ResizeMode.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ResizeMode.java index ceea420c..002c32ad 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ResizeMode.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ResizeMode.java @@ -1,6 +1,6 @@ package com.brentvatne.exoplayer; -import androidx.annotation.IntDef; +import android.support.annotation.IntDef; import java.lang.annotation.Retention; diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java index 24d51e02..00f51c94 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/VideoEventEmitter.java @@ -1,6 +1,6 @@ package com.brentvatne.exoplayer; -import androidx.annotation.StringDef; +import android.support.annotation.StringDef; import android.view.View; import com.facebook.react.bridge.Arguments; diff --git a/examples/basic/android/app/build.gradle b/examples/basic/android/app/build.gradle index 98131921..7b7b949d 100644 --- a/examples/basic/android/app/build.gradle +++ b/examples/basic/android/app/build.gradle @@ -132,8 +132,7 @@ android { dependencies { implementation project(':react-native-video') - // compile "com.android.support:appcompat-v7:25.2.0" - implementation "androidx.appcompat:appcompat:1.0.0" + compile "com.android.support:appcompat-v7:28.0.0" implementation "com.facebook.react:react-native:+" // From node_modules // implementation project(':react-native-video') // compile project(':react-native-video-exoplayer') // uncomment to use exoplayer diff --git a/examples/basic/android/gradle.properties b/examples/basic/android/gradle.properties index e77af9f2..1fd964e9 100644 --- a/examples/basic/android/gradle.properties +++ b/examples/basic/android/gradle.properties @@ -18,5 +18,3 @@ # org.gradle.parallel=true android.useDeprecatedNdk=true -android.useAndroidX=true -android.enableJetifier=true \ No newline at end of file