Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ci/legacy_project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,5 @@ and then deleting everything but `android/` from it:
from version 1.9.0 to 2.1.0. If a user runs into an error with the AGP version,
the warning is clear on how to upgrade the version to one that we support.
- Modifies `gradle.properties` to not set android.enableJetifier=true.
- Update `app/build.gradle` to enable library desugaring to support
`interactive_media_ads` plugin.
8 changes: 8 additions & 0 deletions .ci/legacy_project/all_packages/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ android {
namespace = "com.example.all_packages"
compileSdkVersion flutter.compileSdkVersion

compileOptions {
coreLibraryDesugaringEnabled true
}

defaultConfig {
applicationId "com.example.all_packages"
minSdkVersion flutter.minSdkVersion
Expand All @@ -44,3 +48,7 @@ android {
flutter {
source '../..'
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
}
6 changes: 6 additions & 0 deletions packages/interactive_media_ads/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.8

* Bumps `com.google.ads.interactivemedia.v3:interactivemedia` from 3.36.0 to 3.37.0.
* Adds app desugaring as a requirement for Android apps. Apps without desugaring enabled won't build
with the current or future IMA versions. To enable app desugaring, see `README.md`.

## 0.2.7

* Adds support to retrieve content time offsets at which ad breaks are scheduled. See
Expand Down
2 changes: 1 addition & 1 deletion packages/interactive_media_ads/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ android {
dependencies {
implementation("androidx.annotation:annotation:1.9.1")
implementation("androidx.core:core-ktx:1.13.0")
implementation("com.google.ads.interactivemedia.v3:interactivemedia:3.36.0")
implementation("com.google.ads.interactivemedia.v3:interactivemedia:3.37.0")
testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.mockito.kotlin:mockito-kotlin:6.0.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class AdsRequestProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) :
*
* This must match the version in pubspec.yaml.
*/
const val pluginVersion = "0.2.7"
const val pluginVersion = "0.2.8"
}

override fun setAdTagUrl(pigeon_instance: AdsRequest, adTagUrl: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AdsRequestProxyAPIDelegate: PigeonApiDelegateIMAAdsRequest {
/// The current version of the `interactive_media_ads` plugin.
///
/// This must match the version in pubspec.yaml.
static let pluginVersion = "0.2.7"
static let pluginVersion = "0.2.8"

func pigeonDefaultConstructor(
pigeonApi: PigeonApiIMAAdsRequest, adTagUrl: String, adDisplayContainer: IMAAdDisplayContainer,
Expand Down
2 changes: 1 addition & 1 deletion packages/interactive_media_ads/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: interactive_media_ads
description: A Flutter plugin for using the Interactive Media Ads SDKs on Android and iOS.
repository: https://github.com/flutter/packages/tree/main/packages/interactive_media_ads
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+interactive_media_ads%22
version: 0.2.7 # This must match the version in
version: 0.2.8 # This must match the version in
# `android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt` and
# `ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift`

Expand Down
15 changes: 15 additions & 0 deletions script/tool/lib/src/create_all_packages_app_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ dependencies {}
? ' implementation("androidx.lifecycle:lifecycle-runtime:2.2.0-rc01")'
: " implementation 'androidx.lifecycle:lifecycle-runtime:2.2.0-rc01'";

// Desugaring is required for interactive_media_ads.
final String desugaringDependency = gradleFileIsKotlin
? ' coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")'
: " coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'";

_adjustFile(
gradleFile,
replacements: <String, List<String>>{
Expand All @@ -249,19 +254,29 @@ dependencies {}
}
},
regexReplacements: <RegExp, List<String>>{
// Desugaring is required for interactive_media_ads.
RegExp(r'compileOptions\s+{$'): <String>[
'compileOptions {',
if (gradleFileIsKotlin)
'isCoreLibraryDesugaringEnabled = true'
else
'coreLibraryDesugaringEnabled true',
],
// Tests for https://github.com/flutter/flutter/issues/43383
// Handling of 'dependencies' is more complex since it hasn't been very
// stable across template versions.
// - Handle an empty, collapsed dependencies section.
RegExp(r'^dependencies\s+{\s*}$'): <String>[
'dependencies {',
lifecycleDependency,
desugaringDependency,
'}',
],
// - Handle a normal dependencies section.
RegExp(r'^dependencies\s+{$'): <String>[
'dependencies {',
lifecycleDependency,
desugaringDependency,
],
// - See below for handling of the case where there is no dependencies
// section.
Expand Down