Skip to content

Commit 083736f

Browse files
committed
test: fix Android and web rendering test build configuration
1 parent c9b3d52 commit 083736f

File tree

9 files changed

+118
-52
lines changed

9 files changed

+118
-52
lines changed

lib/src/impl/platform/web/global_video_view_controller_platform_web.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import 'dart:async';
22
import 'dart:html' as html;
3-
import 'dart:ui' as ui;
3+
import 'dart:ui_web' as ui;
44

55
import '/agora_rtc_engine.dart';
66
import '/src/impl/platform/global_video_view_controller_platform.dart';
7-
import 'package:iris_method_channel/iris_method_channel.dart';
87

98
// ignore_for_file: public_member_api_docs
109

@@ -47,8 +46,7 @@ final Map<int, _View> _viewMap = {};
4746

4847
class GlobalVideoViewControllerWeb extends GlobalVideoViewControllerPlatfrom {
4948
GlobalVideoViewControllerWeb(
50-
IrisMethodChannel irisMethodChannel, RtcEngine rtcEngine)
51-
: super(irisMethodChannel, rtcEngine) {
49+
super.irisMethodChannel, super.rtcEngine) {
5250
// ignore: undefined_prefixed_name
5351
ui.platformViewRegistry.registerViewFactory(_platformRendererViewType,
5452
(int viewId) {

test_shard/fake_test_app/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -21,10 +26,6 @@ if (flutterVersionName == null) {
2126
flutterVersionName = '1.0'
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
2930
compileSdkVersion flutter.compileSdkVersion
3031

test_shard/fake_test_app/android/settings.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
212

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
519

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
24+
}
25+
26+
include ':app'
827

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

test_shard/integration_test_app/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -21,10 +26,6 @@ if (flutterVersionName == null) {
2126
flutterVersionName = '1.0'
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
2930
compileSdkVersion 34
3031

test_shard/integration_test_app/android/settings.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
212

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
519

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
24+
}
25+
26+
include ':app'
827

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

test_shard/iris_tester/example/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -21,10 +26,6 @@ if (flutterVersionName == null) {
2126
flutterVersionName = '1.0'
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
2930
compileSdkVersion flutter.compileSdkVersion
3031
ndkVersion flutter.ndkVersion

test_shard/iris_tester/example/android/settings.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
212

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
519

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
24+
}
25+
26+
include ':app'
827

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

test_shard/rendering_test/android/app/build.gradle

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
plugins {
2+
id "com.android.application"
3+
id "kotlin-android"
4+
id "dev.flutter.flutter-gradle-plugin"
5+
}
16
def localProperties = new Properties()
27
def localPropertiesFile = rootProject.file('local.properties')
38
if (localPropertiesFile.exists()) {
@@ -21,10 +26,6 @@ if (flutterVersionName == null) {
2126
flutterVersionName = '1.0'
2227
}
2328

24-
apply plugin: 'com.android.application'
25-
apply plugin: 'kotlin-android'
26-
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27-
2829
android {
2930
compileSdkVersion flutter.compileSdkVersion
3031
ndkVersion flutter.ndkVersion

test_shard/rendering_test/android/settings.gradle

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1-
include ':app'
1+
pluginManagement {
2+
def flutterSdkPath = {
3+
def properties = new Properties()
4+
file("local.properties").withInputStream { properties.load(it) }
5+
def flutterSdkPath = properties.getProperty("flutter.sdk")
6+
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
7+
return flutterSdkPath
8+
}
9+
settings.ext.flutterSdkPath = flutterSdkPath()
10+
11+
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
212

3-
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4-
def properties = new Properties()
13+
repositories {
14+
google()
15+
mavenCentral()
16+
gradlePluginPortal()
17+
}
18+
}
519

6-
assert localPropertiesFile.exists()
7-
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
20+
plugins {
21+
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
22+
id "com.android.application" version "8.3.0" apply false
23+
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
24+
}
25+
26+
include ':app'
827

9-
def flutterSdkPath = properties.getProperty("flutter.sdk")
10-
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11-
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"

0 commit comments

Comments
 (0)