fix(android): ads build and enable ads in android sample (#3376)
* fix: refactor androidx core version management * chore: fix missing import rework for media3 * fix: enable IMA in sample * chore: rename stub fie * chore: code review, fix variable name * chore: reorder imports * chore: fix linking in sample * chore: fix stub management * chore: few cleans and ensure we don't use ima is disabled --------- Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
@@ -101,8 +101,12 @@ android {
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
configurations.all {
|
||||
resolutionStrategy { force 'androidx.core:core:1.9.0' }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
implementation("com.facebook.react:react-android")
|
||||
@@ -120,6 +124,15 @@ dependencies {
|
||||
}
|
||||
|
||||
implementation project(':react-native-video')
|
||||
|
||||
constraints {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
|
||||
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
|
||||
}
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
|
||||
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
|
||||
|
@@ -30,7 +30,7 @@ public class MainApplication extends Application implements ReactApplication {
|
||||
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
packages.add(new ReactVideoPackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
|
@@ -6,10 +6,12 @@ buildscript {
|
||||
minSdkVersion = 21
|
||||
compileSdkVersion = 33
|
||||
targetSdkVersion = 33
|
||||
kotlinVersion = "1.6.20"
|
||||
kotlinVersion = "1.8.0"
|
||||
|
||||
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
||||
ndkVersion = "23.1.7779620"
|
||||
|
||||
RNVUseExoplayerIMA = true
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
|
@@ -14,7 +14,6 @@
|
||||
"@react-native-picker/picker": "^1.9.11",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.5",
|
||||
"react-native-video": "../../",
|
||||
"react-native-windows": "0.63.41"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@@ -715,7 +715,7 @@ class VideoPlayer extends Component {
|
||||
this.video = ref;
|
||||
}}
|
||||
source={this.srcList[this.state.srcListId]}
|
||||
//adTagUrl={this.srcList[this.state.srcListId]?.adTagUrl}
|
||||
adTagUrl={this.srcList[this.state.srcListId]?.adTagUrl}
|
||||
style={viewStyle}
|
||||
rate={this.state.rate}
|
||||
paused={this.state.paused}
|
||||
|
@@ -6129,9 +6129,6 @@ react-is@^17.0.1:
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
||||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
||||
|
||||
react-native-video@../../:
|
||||
version "6.0.0-beta.0"
|
||||
|
||||
react-native-windows@0.63.41:
|
||||
version "0.63.41"
|
||||
resolved "https://registry.yarnpkg.com/react-native-windows/-/react-native-windows-0.63.41.tgz#96f59bc24749b6c167cb4f35fd74b66f78f4a4bb"
|
||||
|
Reference in New Issue
Block a user