Skip to content

Commit

Permalink
Updates sample apps to IMA v3.31.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 579831221
  • Loading branch information
google-ima-devrel-bot authored and IMA Developer Relations committed Nov 6, 2023
1 parent fd27647 commit 68bbe76
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 53 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- "ExoPlayerExample"
- "SampleVideoPlayer"
steps:
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Clone Repo
uses: actions/checkout@v1
Expand Down
25 changes: 13 additions & 12 deletions AdvancedExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ apply plugin: 'com.android.application'

android {
namespace "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
compileSdkVersion 33
compileSdk 34

// Java 11+ required by Gradle 7.0.2
// Java 17 required by Gradle 8+
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig {
applicationId "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
minSdkVersion 19
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -32,14 +32,15 @@ repositories {
}

dependencies {
def media3_version = "1.1.1"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.media3:media3-ui:1.0.1'
implementation 'androidx.media3:media3-exoplayer:1.0.1'
implementation 'androidx.media3:media3-exoplayer-hls:1.0.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.0.1'
implementation 'androidx.mediarouter:mediarouter:1.3.1'
implementation 'androidx.recyclerview:recyclerview:1.3.0'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.30.1'
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
implementation "androidx.media3:media3-exoplayer-dash:$media3_version"
implementation 'androidx.mediarouter:mediarouter:1.6.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
}
1 change: 1 addition & 0 deletions AdvancedExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Required permissions for the video player -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
Expand Down
2 changes: 1 addition & 1 deletion AdvancedExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.1.2'
}
}
2 changes: 1 addition & 1 deletion AdvancedExample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
25 changes: 13 additions & 12 deletions BasicExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ apply plugin: 'com.android.application'

android {
namespace "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
compileSdkVersion 33
compileSdk 34

// Java 11+ required by Gradle 7.0.2
// Java 17 required by Gradle 8+
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig {
applicationId "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
minSdkVersion 16
targetSdkVersion 33
minSdkVersion 19
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -32,12 +32,13 @@ repositories {
}

dependencies {
def media3_version = "1.1.1"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.media3:media3-ui:1.0.1'
implementation 'androidx.media3:media3-exoplayer:1.0.1'
implementation 'androidx.media3:media3-exoplayer-hls:1.0.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.0.1'
implementation 'androidx.mediarouter:mediarouter:1.3.1'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.30.1'
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
implementation "androidx.media3:media3-exoplayer-dash:$media3_version"
implementation 'androidx.mediarouter:mediarouter:1.6.0'
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.31.0'
}
1 change: 1 addition & 0 deletions BasicExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Required permissions for the video player -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
Expand Down
2 changes: 1 addition & 1 deletion BasicExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion BasicExample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
22 changes: 12 additions & 10 deletions ExoPlayerExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ apply plugin: 'com.android.application'

android {
namespace 'com.google.ads.interactivemedia.v3.samples.videoplayerapp'
compileSdkVersion 33
compileSdk 34

// Java 11 required by Gradle 7.0.2
// Java 17 required by Gradle 8+
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig {
applicationId "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
minSdkVersion 19
targetSdkVersion 33
targetSdkVersion 34
multiDexEnabled true
versionCode 1
versionName "1.0"
Expand All @@ -32,13 +32,15 @@ repositories {
}

dependencies {
def media3_version = "1.1.1"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.media3:media3-ui:1.0.1'
implementation 'androidx.media3:media3-exoplayer:1.0.1'
implementation 'androidx.media3:media3-exoplayer-hls:1.0.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.0.1'
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
implementation "androidx.media3:media3-exoplayer-dash:$media3_version"

// The library adds the IMA ExoPlayer integration for ads.
implementation 'androidx.media3:media3-exoplayer-ima:1.0.1'
implementation "androidx.media3:media3-exoplayer-ima:$media3_version"
}
1 change: 1 addition & 0 deletions ExoPlayerExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- Required permissions for the IMA SDK -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
Expand Down
2 changes: 1 addition & 1 deletion ExoPlayerExample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.android.tools.build:gradle:8.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion ExoPlayerExample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
19 changes: 10 additions & 9 deletions SampleVideoPlayer/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ apply plugin: 'com.android.application'

android {
namespace "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
compileSdkVersion 33
compileSdk 34

// Java 11+ required by Gradle 7.0.2
// Java 17 required by Gradle 8+
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

defaultConfig {
applicationId "com.google.ads.interactivemedia.v3.samples.videoplayerapp"
minSdkVersion 19
targetSdkVersion 33
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
Expand All @@ -32,10 +32,11 @@ repositories {
}

dependencies {
def media3_version = "1.1.1"
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.media3:media3-ui:1.0.1'
implementation 'androidx.media3:media3-exoplayer:1.0.1'
implementation 'androidx.media3:media3-exoplayer-hls:1.0.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.0.1'
implementation "androidx.media3:media3-ui:$media3_version"
implementation "androidx.media3:media3-exoplayer:$media3_version"
implementation "androidx.media3:media3-exoplayer-hls:$media3_version"
implementation "androidx.media3:media3-exoplayer-dash:$media3_version"
}
2 changes: 1 addition & 1 deletion SampleVideoPlayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
classpath 'com.android.tools.build:gradle:8.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
2 changes: 1 addition & 1 deletion SampleVideoPlayer/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip

0 comments on commit 68bbe76

Please sign in to comment.