Skip to content

Commit

Permalink
chore: AGP 8 compatibility (#820)
Browse files Browse the repository at this point in the history
* AGP 8 compatibility

* bumped flutter_callkit_incoming version

* changelog fix

* changelog added

* bumped flutter version in distribution CI
  • Loading branch information
Brazol authored Jan 8, 2025
1 parent adc76e1 commit f78f88b
Show file tree
Hide file tree
Showing 25 changed files with 135 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/app-distribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: "3.24.3"
FLUTTER_VERSION: "3.27.1"
FLUTTER_CHANNEL: stable
ENV_PROPERTIES: ${{ secrets.ENV_PROPERTIES }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
Expand Down
15 changes: 7 additions & 8 deletions dogfooding/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "com.google.gms.google-services"
id "dev.flutter.flutter-gradle-plugin"
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
Expand Down Expand Up @@ -27,13 +34,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
// START: FlutterFire Configuration
apply plugin: 'com.google.gms.google-services'
// END: FlutterFire Configuration
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
if (project.android.hasProperty("namespace")) {
namespace = "io.getstream.video.flutter.dogfooding"
Expand Down Expand Up @@ -100,6 +100,5 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:multidex:1.0.3'
}
3 changes: 1 addition & 2 deletions dogfooding/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.dogfooding">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
3 changes: 1 addition & 2 deletions dogfooding/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.dogfooding">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:name="android.hardware.camera"/>
Expand Down
3 changes: 1 addition & 2 deletions dogfooding/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.dogfooding">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
16 changes: 0 additions & 16 deletions dogfooding/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
// START: FlutterFire Configuration
classpath 'com.google.gms:google-services:4.3.14'
// END: FlutterFire Configuration
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
31 changes: 23 additions & 8 deletions dogfooding/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
include ':app'
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
id "com.google.gms.google-services" version "4.4.0" apply false
}

include ":app"
10 changes: 5 additions & 5 deletions dogfooding/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ dependencies:
cupertino_icons: ^1.0.8
device_info_plus: ^10.1.2
envied: ^0.5.4+1
firebase_auth: ^5.3.1
firebase_core: ^3.6.0
firebase_crashlytics: ^4.1.3
firebase_messaging: ^15.1.3
firebase_auth: ^5.3.4
firebase_core: ^3.9.0
firebase_crashlytics: ^4.2.0
firebase_messaging: ^15.1.6
fl_chart: ^0.69.0
flutter:
sdk: flutter
Expand All @@ -33,7 +33,7 @@ dependencies:
rxdart: ^0.28.0
share_plus: ^10.0.2
shared_preferences: ^2.3.2
stream_chat_flutter: ^8.1.0
stream_chat_flutter: ^9.0.0
stream_video_flutter: ^0.6.1
stream_video_push_notification: ^0.6.1
stream_video_screen_sharing: ^0.6.1
Expand Down
6 changes: 6 additions & 0 deletions packages/stream_video/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Unreleased

🚧 Breaking changes

* The package is now compatible with Gradle 8. The minimum required Java version is now 17.

## 0.6.1

* Updated minimum Flutter version to 3.24.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,6 @@ extension DeviceExt on open.Device {

extension DeviceListExt on List<open.Device> {
List<PushDevice> toPushDevices() {
return map((it) => it.toPushDevice()).whereNotNull().toList();
return map((it) => it.toPushDevice()).nonNulls.toList();
}
}
2 changes: 1 addition & 1 deletion packages/stream_video/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies:
synchronized: ^3.1.0
system_info2: ^4.0.0
tart: ^0.5.1
thermal: ^1.1.8
thermal: ^1.1.10
uuid: ^4.2.1
web: ^1.0.0
web_socket_channel: ^3.0.1
Expand Down
9 changes: 8 additions & 1 deletion packages/stream_video_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
## Unreleased

🚧 Breaking changes

* The package is now compatible with Gradle 8. The minimum required Java version is now 17.
* Updated the `flutter_callkit_incoming` package to version 2.5.0, which also requires Java 17.

## 0.6.1

* Updated minimum Flutter version to 3.24.5

✅ Added
* Added the 'call.collectUserFeedback()' method which allows users to send call quality rating. These ratings are visible on the Dashboard and are aggregated in call stats for easy tracking. For a sample implementation, please refer to the [cookbook](https://getstream.io/video/docs/flutter/ui-cookbook/call-quality-rating/).
* Added the `call.collectUserFeedback()` method which allows users to send call quality rating. These ratings are visible on the Dashboard and are aggregated in call stats for easy tracking. For a sample implementation, please refer to the [documentation](https://getstream.io/video/docs/flutter/user-rating/).
* Added device thermal status reporting to better optimize call quality.
* Added the `StreamVideoPushNotificationManager.ensureFullScreenIntentPermission()` method. This resolves an issue on some Android 14 devices where full-screen notifications would not appear due to missing permissions.
You can now invoke this method to show a settings screen, allowing users to enable the required permission if it's not already enabled.
Expand Down
20 changes: 3 additions & 17 deletions packages/stream_video_flutter/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
group 'io.getstream.video.flutter.stream_video_flutter'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
plugins {
id "com.android.library"
id "kotlin-android"
}

allprojects {
Expand All @@ -21,9 +10,6 @@ allprojects {
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
if (project.android.hasProperty("namespace")) {
namespace 'io.getstream.video.flutter.stream_video_flutter'
Expand Down
26 changes: 26 additions & 0 deletions packages/stream_video_flutter/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.library" version "7.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}

include ":app"

rootProject.name = 'stream_video_flutter'
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.stream_video_flutter">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
if (project.android.hasProperty("namespace")) {
namespace = "io.getstream.video.flutter.dogfooding"
}

compileSdkVersion 34
ndkVersion flutter.ndkVersion

compileOptions {
//Required by flutter_local_notifications
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Expand Down Expand Up @@ -70,6 +76,8 @@ flutter {
}

dependencies {
//Required by flutter_local_notifications
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'io.getstream:stream-log:1.1.3'
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.dogfooding">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.getstream.video.flutter.dogfooding">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:name="android.hardware.camera"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class _StreamLobbyViewState extends State<StreamLobbyView> {

final participants = _participants
.map((it) => _users[it.userId])
.whereNotNull()
.nonNulls
.map((e) => e.toUserInfo())
.toList();
return Scaffold(
Expand Down
7 changes: 7 additions & 0 deletions packages/stream_video_push_notification/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Unreleased

🚧 Breaking changes

* The package is now compatible with Gradle 8. The minimum required Java version is now 17.
* Updated the `flutter_callkit_incoming` package to version 2.5.0, which also requires Java 17.

## 0.6.1

* Updated minimum Flutter version to 3.24.5
Expand Down
17 changes: 3 additions & 14 deletions packages/stream_video_push_notification/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
buildscript {
ext.kotlin_version = "1.9.10"
repositories {
google()
mavenCentral()
}

dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
}
plugins {
id "com.android.library"
id "kotlin-android"
}

allprojects {
Expand All @@ -18,9 +10,6 @@ allprojects {
}
}

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

android {
if (project.android.hasProperty("namespace")) {
namespace = "io.getstream.video.flutter.stream_video_push_notification"
Expand Down
26 changes: 26 additions & 0 deletions packages/stream_video_push_notification/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.library" version "7.3.1" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}

include ":app"

rootProject.name = 'stream_video_push_notification'
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.stream_video_push_notification">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
</manifest>
2 changes: 1 addition & 1 deletion packages/stream_video_push_notification/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
flutter:
sdk: flutter
flutter_webrtc: ^0.11.7
flutter_callkit_incoming: ^2.0.4+2
flutter_callkit_incoming: ^2.5.0
json_annotation: ^4.9.0
meta: ^1.9.1
plugin_platform_interface: ^2.1.8
Expand Down

0 comments on commit f78f88b

Please sign in to comment.