update for androidX

This commit is contained in:
vok
2019-06-19 14:37:21 +07:00
parent e28ae17579
commit 4f36eb1254
13 changed files with 4100 additions and 2511 deletions

View File

@@ -83,13 +83,16 @@ def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.videoplayer"
minSdkVersion 16
targetSdkVersion 25
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
ndk {
@@ -108,6 +111,7 @@ android {
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
matchingFallbacks = ['release', 'debug']
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
@@ -127,9 +131,11 @@ android {
}
dependencies {
compile "com.android.support:appcompat-v7:25.2.0"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-video')
implementation project(':react-native-video')
// compile "com.android.support:appcompat-v7:25.2.0"
implementation "androidx.appcompat:appcompat:1.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
}

View File

@@ -7,8 +7,8 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
android:minSdkVersion="19"
android:targetSdkVersion="28" />
<application
android:name=".MainApplication"

View File

@@ -4,6 +4,8 @@ import android.app.Application;
import com.brentvatne.react.ReactVideoPackage;
import com.facebook.react.ReactApplication;
import com.brentvatne.react.ReactVideoPackage;
import com.brentvatne.react.ReactVideoPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
@@ -24,6 +26,8 @@ public class MainApplication extends Application implements ReactApplication {
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new ReactVideoPackage(),
new ReactVideoPackage(),
new ReactVideoPackage()
);
}