From 513a05ead047e1a988fde7949b652c1abb5f9249 Mon Sep 17 00:00:00 2001 From: Brett Morgan Date: Tue, 19 Nov 2024 20:45:56 +1100 Subject: [PATCH] Update `testing_codelab` --- testing_codelab/codelab_rebuild.yaml | 159 ++++++++---------- .../app/{build.gradle => build.gradle.kts} | 10 +- testing_codelab/step_03/android/build.gradle | 18 -- .../step_03/android/build.gradle.kts | 21 +++ .../step_03/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_03/android/settings.gradle | 25 --- .../step_03/android/settings.gradle.kts | 25 +++ testing_codelab/step_03/ios/Podfile | 1 - testing_codelab/step_03/macos/Podfile | 1 - .../android/app/build.gradle.kts} | 10 +- testing_codelab/step_04/android/build.gradle | 18 -- .../step_04/android/build.gradle.kts | 21 +++ .../step_04/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_04/android/settings.gradle | 25 --- .../step_04/android/settings.gradle.kts | 25 +++ testing_codelab/step_04/ios/Podfile | 1 - testing_codelab/step_04/macos/Podfile | 1 - .../android/app/build.gradle.kts} | 10 +- testing_codelab/step_05/android/build.gradle | 18 -- .../step_05/android/build.gradle.kts | 21 +++ .../step_05/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_05/android/settings.gradle | 25 --- .../step_05/android/settings.gradle.kts | 25 +++ testing_codelab/step_05/ios/Podfile | 1 - testing_codelab/step_05/macos/Podfile | 1 - .../android/app/build.gradle.kts} | 10 +- testing_codelab/step_06/android/build.gradle | 18 -- .../step_06/android/build.gradle.kts | 21 +++ .../step_06/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_06/android/settings.gradle | 25 --- .../step_06/android/settings.gradle.kts | 25 +++ testing_codelab/step_06/ios/Podfile | 1 - testing_codelab/step_06/macos/Podfile | 1 - .../step_07/android/app/build.gradle | 44 ----- .../step_07/android/app/build.gradle.kts | 44 +++++ testing_codelab/step_07/android/build.gradle | 18 -- .../step_07/android/build.gradle.kts | 21 +++ .../step_07/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_07/android/settings.gradle | 25 --- .../step_07/android/settings.gradle.kts | 25 +++ testing_codelab/step_07/ios/Podfile | 1 - testing_codelab/step_07/macos/Podfile | 1 - .../macos/Runner.xcodeproj/project.pbxproj | 76 ++++----- .../step_08/android/app/build.gradle | 44 ----- .../step_08/android/app/build.gradle.kts | 44 +++++ testing_codelab/step_08/android/build.gradle | 18 -- .../step_08/android/build.gradle.kts | 21 +++ .../step_08/android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../step_08/android/settings.gradle | 25 --- .../step_08/android/settings.gradle.kts | 25 +++ testing_codelab/step_08/ios/Podfile | 1 - testing_codelab/step_08/macos/Podfile | 1 - .../macos/Runner.xcodeproj/project.pbxproj | 76 ++++----- 59 files changed, 546 insertions(+), 551 deletions(-) rename testing_codelab/step_03/android/app/{build.gradle => build.gradle.kts} (84%) delete mode 100644 testing_codelab/step_03/android/build.gradle create mode 100644 testing_codelab/step_03/android/build.gradle.kts delete mode 100644 testing_codelab/step_03/android/settings.gradle create mode 100644 testing_codelab/step_03/android/settings.gradle.kts rename testing_codelab/{step_05/android/app/build.gradle => step_04/android/app/build.gradle.kts} (84%) delete mode 100644 testing_codelab/step_04/android/build.gradle create mode 100644 testing_codelab/step_04/android/build.gradle.kts delete mode 100644 testing_codelab/step_04/android/settings.gradle create mode 100644 testing_codelab/step_04/android/settings.gradle.kts rename testing_codelab/{step_06/android/app/build.gradle => step_05/android/app/build.gradle.kts} (84%) delete mode 100644 testing_codelab/step_05/android/build.gradle create mode 100644 testing_codelab/step_05/android/build.gradle.kts delete mode 100644 testing_codelab/step_05/android/settings.gradle create mode 100644 testing_codelab/step_05/android/settings.gradle.kts rename testing_codelab/{step_04/android/app/build.gradle => step_06/android/app/build.gradle.kts} (84%) delete mode 100644 testing_codelab/step_06/android/build.gradle create mode 100644 testing_codelab/step_06/android/build.gradle.kts delete mode 100644 testing_codelab/step_06/android/settings.gradle create mode 100644 testing_codelab/step_06/android/settings.gradle.kts delete mode 100644 testing_codelab/step_07/android/app/build.gradle create mode 100644 testing_codelab/step_07/android/app/build.gradle.kts delete mode 100644 testing_codelab/step_07/android/build.gradle create mode 100644 testing_codelab/step_07/android/build.gradle.kts delete mode 100644 testing_codelab/step_07/android/settings.gradle create mode 100644 testing_codelab/step_07/android/settings.gradle.kts delete mode 100644 testing_codelab/step_08/android/app/build.gradle create mode 100644 testing_codelab/step_08/android/app/build.gradle.kts delete mode 100644 testing_codelab/step_08/android/build.gradle create mode 100644 testing_codelab/step_08/android/build.gradle.kts delete mode 100644 testing_codelab/step_08/android/settings.gradle create mode 100644 testing_codelab/step_08/android/settings.gradle.kts diff --git a/testing_codelab/codelab_rebuild.yaml b/testing_codelab/codelab_rebuild.yaml index a3cfc699b6..2100c1ac96 100644 --- a/testing_codelab/codelab_rebuild.yaml +++ b/testing_codelab/codelab_rebuild.yaml @@ -66,6 +66,9 @@ steps: import 'package:flutter/material.dart'; void main() { + - name: Format lib/main.dart + path: testing_app + dart: format lib/main.dart - name: Copy step_03 copydir: from: testing_app @@ -121,9 +124,7 @@ steps: child: MaterialApp.router( title: 'Testing Sample', theme: ThemeData( - colorScheme: ColorScheme.fromSeed( - seedColor: Colors.deepPurple, - ), + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), useMaterial3: true, ), routerConfig: _router, @@ -168,39 +169,39 @@ steps: // Copyright 2020 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; - + import '../models/favorites.dart'; - + class FavoritesPage extends StatelessWidget { const FavoritesPage({super.key}); - + static String routeName = 'favorites_page'; - + @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: const Text('Favorites'), - ), + appBar: AppBar(title: const Text('Favorites')), body: Consumer( - builder: (context, value, child) => ListView.builder( - itemCount: value.items.length, - padding: const EdgeInsets.symmetric(vertical: 16), - itemBuilder: (context, index) => FavoriteItemTile(value.items[index]), - ), + builder: + (context, value, child) => ListView.builder( + itemCount: value.items.length, + padding: const EdgeInsets.symmetric(vertical: 16), + itemBuilder: + (context, index) => FavoriteItemTile(value.items[index]), + ), ), ); } } - + class FavoriteItemTile extends StatelessWidget { const FavoriteItemTile(this.itemNo, {super.key}); - + final int itemNo; - + @override Widget build(BuildContext context) { return Padding( @@ -209,10 +210,7 @@ steps: leading: CircleAvatar( backgroundColor: Colors.primaries[itemNo % Colors.primaries.length], ), - title: Text( - 'Item $itemNo', - key: Key('favorites_text_$itemNo'), - ), + title: Text('Item $itemNo', key: Key('favorites_text_$itemNo')), trailing: IconButton( key: Key('remove_icon_$itemNo'), icon: const Icon(Icons.close), @@ -236,18 +234,18 @@ steps: // Copyright 2020 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; import 'package:provider/provider.dart'; import '../models/favorites.dart'; import 'favorites.dart'; - + class HomePage extends StatelessWidget { static String routeName = '/'; - + const HomePage({super.key}); - + @override Widget build(BuildContext context) { return Scaffold( @@ -272,40 +270,40 @@ steps: ); } } - + class ItemTile extends StatelessWidget { final int itemNo; - + const ItemTile(this.itemNo, {super.key}); - + @override Widget build(BuildContext context) { var favoritesList = Provider.of(context); - + return Padding( padding: const EdgeInsets.all(8.0), child: ListTile( leading: CircleAvatar( backgroundColor: Colors.primaries[itemNo % Colors.primaries.length], ), - title: Text( - 'Item $itemNo', - key: Key('text_$itemNo'), - ), + title: Text('Item $itemNo', key: Key('text_$itemNo')), trailing: IconButton( key: Key('icon_$itemNo'), - icon: favoritesList.items.contains(itemNo) - ? const Icon(Icons.favorite) - : const Icon(Icons.favorite_border), + icon: + favoritesList.items.contains(itemNo) + ? const Icon(Icons.favorite) + : const Icon(Icons.favorite_border), onPressed: () { !favoritesList.items.contains(itemNo) ? favoritesList.add(itemNo) : favoritesList.remove(itemNo); ScaffoldMessenger.of(context).showSnackBar( SnackBar( - content: Text(favoritesList.items.contains(itemNo) - ? 'Added to favorites.' - : 'Removed from favorites.'), + content: Text( + favoritesList.items.contains(itemNo) + ? 'Added to favorites.' + : 'Removed from favorites.', + ), duration: const Duration(seconds: 1), ), ); @@ -413,14 +411,12 @@ steps: late Favorites favoritesList; Widget createFavoritesScreen() => ChangeNotifierProvider( - create: (context) { - favoritesList = Favorites(); - return favoritesList; - }, - child: const MaterialApp( - home: FavoritesPage(), - ), - ); + create: (context) { + favoritesList = Favorites(); + return favoritesList; + }, + child: const MaterialApp(home: FavoritesPage()), + ); void addItems() { for (var i = 0; i < 10; i += 2) { @@ -444,8 +440,10 @@ steps: var totalItems = tester.widgetList(find.byIcon(Icons.close)).length; await tester.tap(find.byIcon(Icons.close).first); await tester.pumpAndSettle(); - expect(tester.widgetList(find.byIcon(Icons.close)).length, - lessThan(totalItems)); + expect( + tester.widgetList(find.byIcon(Icons.close)).length, + lessThan(totalItems), + ); expect(find.text('Removed from favorites.'), findsOneWidget); }); }); @@ -456,39 +454,33 @@ steps: // Copyright 2020 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:provider/provider.dart'; import 'package:testing_app/models/favorites.dart'; import 'package:testing_app/screens/home.dart'; - + Widget createHomeScreen() => ChangeNotifierProvider( - create: (context) => Favorites(), - child: const MaterialApp( - home: HomePage(), - ), - ); - + create: (context) => Favorites(), + child: const MaterialApp(home: HomePage()), + ); + void main() { group('Home Page Widget Tests', () { testWidgets('Testing if ListView shows up', (tester) async { await tester.pumpWidget(createHomeScreen()); expect(find.byType(ListView), findsOneWidget); }); - + testWidgets('Testing Scrolling', (tester) async { await tester.pumpWidget(createHomeScreen()); expect(find.text('Item 0'), findsOneWidget); - await tester.fling( - find.byType(ListView), - const Offset(0, -200), - 3000, - ); + await tester.fling(find.byType(ListView), const Offset(0, -200), 3000); await tester.pumpAndSettle(); expect(find.text('Item 0'), findsNothing); }); - + testWidgets('Testing IconButtons', (tester) async { await tester.pumpWidget(createHomeScreen()); expect(find.byIcon(Icons.favorite), findsNothing); @@ -526,42 +518,38 @@ steps: // Copyright 2021 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:testing_app/main.dart'; - + void main() { group('Testing App', () { testWidgets('Favorites operations test', (tester) async { await tester.pumpWidget(const TestingApp()); - - final iconKeys = [ - 'icon_0', - 'icon_1', - 'icon_2', - ]; - + + final iconKeys = ['icon_0', 'icon_1', 'icon_2']; + for (var icon in iconKeys) { await tester.tap(find.byKey(ValueKey(icon))); await tester.pumpAndSettle(const Duration(seconds: 1)); - + expect(find.text('Added to favorites.'), findsOneWidget); } - + await tester.tap(find.text('Favorites')); await tester.pumpAndSettle(); - + final removeIconKeys = [ 'remove_icon_0', 'remove_icon_1', 'remove_icon_2', ]; - + for (final iconKey in removeIconKeys) { await tester.tap(find.byKey(ValueKey(iconKey))); await tester.pumpAndSettle(const Duration(seconds: 1)); - + expect(find.text('Removed from favorites.'), findsOneWidget); } }); @@ -634,19 +622,20 @@ steps: // Copyright 2020 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + import 'package:flutter_driver/flutter_driver.dart' as driver; import 'package:integration_test/integration_test_driver.dart'; - + Future main() { return integrationDriver( responseDataCallback: (data) async { if (data != null) { final timeline = driver.Timeline.fromJson( - data['scrolling_summary'] as Map); - + data['scrolling_summary'] as Map, + ); + final summary = driver.TimelineSummary.summarize(timeline); - + await summary.writeTimelineToFile( 'scrolling_summary', pretty: true, diff --git a/testing_codelab/step_03/android/app/build.gradle b/testing_codelab/step_03/android/app/build.gradle.kts similarity index 84% rename from testing_codelab/step_03/android/app/build.gradle rename to testing_codelab/step_03/android/app/build.gradle.kts index 10e017b858..3c92fcf2d1 100644 --- a/testing_codelab/step_03/android/app/build.gradle +++ b/testing_codelab/step_03/android/app/build.gradle.kts @@ -1,8 +1,8 @@ plugins { - id "com.android.application" - id "kotlin-android" + id("com.android.application") + id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" + id("dev.flutter.flutter-gradle-plugin") } android { @@ -16,7 +16,7 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_1_8.toString() } defaultConfig { @@ -34,7 +34,7 @@ android { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/testing_codelab/step_03/android/build.gradle b/testing_codelab/step_03/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_03/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_03/android/build.gradle.kts b/testing_codelab/step_03/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_03/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_03/android/gradle.properties b/testing_codelab/step_03/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_03/android/gradle.properties +++ b/testing_codelab/step_03/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_03/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_03/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_03/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_03/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_03/android/settings.gradle b/testing_codelab/step_03/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_03/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_03/android/settings.gradle.kts b/testing_codelab/step_03/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_03/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_03/ios/Podfile b/testing_codelab/step_03/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_03/ios/Podfile +++ b/testing_codelab/step_03/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_03/macos/Podfile b/testing_codelab/step_03/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_03/macos/Podfile +++ b/testing_codelab/step_03/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_05/android/app/build.gradle b/testing_codelab/step_04/android/app/build.gradle.kts similarity index 84% rename from testing_codelab/step_05/android/app/build.gradle rename to testing_codelab/step_04/android/app/build.gradle.kts index 10e017b858..3c92fcf2d1 100644 --- a/testing_codelab/step_05/android/app/build.gradle +++ b/testing_codelab/step_04/android/app/build.gradle.kts @@ -1,8 +1,8 @@ plugins { - id "com.android.application" - id "kotlin-android" + id("com.android.application") + id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" + id("dev.flutter.flutter-gradle-plugin") } android { @@ -16,7 +16,7 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_1_8.toString() } defaultConfig { @@ -34,7 +34,7 @@ android { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/testing_codelab/step_04/android/build.gradle b/testing_codelab/step_04/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_04/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_04/android/build.gradle.kts b/testing_codelab/step_04/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_04/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_04/android/gradle.properties b/testing_codelab/step_04/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_04/android/gradle.properties +++ b/testing_codelab/step_04/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_04/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_04/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_04/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_04/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_04/android/settings.gradle b/testing_codelab/step_04/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_04/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_04/android/settings.gradle.kts b/testing_codelab/step_04/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_04/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_04/ios/Podfile b/testing_codelab/step_04/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_04/ios/Podfile +++ b/testing_codelab/step_04/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_04/macos/Podfile b/testing_codelab/step_04/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_04/macos/Podfile +++ b/testing_codelab/step_04/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_06/android/app/build.gradle b/testing_codelab/step_05/android/app/build.gradle.kts similarity index 84% rename from testing_codelab/step_06/android/app/build.gradle rename to testing_codelab/step_05/android/app/build.gradle.kts index 10e017b858..3c92fcf2d1 100644 --- a/testing_codelab/step_06/android/app/build.gradle +++ b/testing_codelab/step_05/android/app/build.gradle.kts @@ -1,8 +1,8 @@ plugins { - id "com.android.application" - id "kotlin-android" + id("com.android.application") + id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" + id("dev.flutter.flutter-gradle-plugin") } android { @@ -16,7 +16,7 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_1_8.toString() } defaultConfig { @@ -34,7 +34,7 @@ android { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/testing_codelab/step_05/android/build.gradle b/testing_codelab/step_05/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_05/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_05/android/build.gradle.kts b/testing_codelab/step_05/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_05/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_05/android/gradle.properties b/testing_codelab/step_05/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_05/android/gradle.properties +++ b/testing_codelab/step_05/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_05/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_05/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_05/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_05/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_05/android/settings.gradle b/testing_codelab/step_05/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_05/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_05/android/settings.gradle.kts b/testing_codelab/step_05/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_05/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_05/ios/Podfile b/testing_codelab/step_05/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_05/ios/Podfile +++ b/testing_codelab/step_05/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_05/macos/Podfile b/testing_codelab/step_05/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_05/macos/Podfile +++ b/testing_codelab/step_05/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_04/android/app/build.gradle b/testing_codelab/step_06/android/app/build.gradle.kts similarity index 84% rename from testing_codelab/step_04/android/app/build.gradle rename to testing_codelab/step_06/android/app/build.gradle.kts index 10e017b858..3c92fcf2d1 100644 --- a/testing_codelab/step_04/android/app/build.gradle +++ b/testing_codelab/step_06/android/app/build.gradle.kts @@ -1,8 +1,8 @@ plugins { - id "com.android.application" - id "kotlin-android" + id("com.android.application") + id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" + id("dev.flutter.flutter-gradle-plugin") } android { @@ -16,7 +16,7 @@ android { } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_1_8.toString() } defaultConfig { @@ -34,7 +34,7 @@ android { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/testing_codelab/step_06/android/build.gradle b/testing_codelab/step_06/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_06/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_06/android/build.gradle.kts b/testing_codelab/step_06/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_06/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_06/android/gradle.properties b/testing_codelab/step_06/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_06/android/gradle.properties +++ b/testing_codelab/step_06/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_06/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_06/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_06/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_06/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_06/android/settings.gradle b/testing_codelab/step_06/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_06/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_06/android/settings.gradle.kts b/testing_codelab/step_06/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_06/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_06/ios/Podfile b/testing_codelab/step_06/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_06/ios/Podfile +++ b/testing_codelab/step_06/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_06/macos/Podfile b/testing_codelab/step_06/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_06/macos/Podfile +++ b/testing_codelab/step_06/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_07/android/app/build.gradle b/testing_codelab/step_07/android/app/build.gradle deleted file mode 100644 index 10e017b858..0000000000 --- a/testing_codelab/step_07/android/app/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" -} - -android { - namespace = "com.example.testing_app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.testing_app" - // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug - } - } -} - -flutter { - source = "../.." -} diff --git a/testing_codelab/step_07/android/app/build.gradle.kts b/testing_codelab/step_07/android/app/build.gradle.kts new file mode 100644 index 0000000000..3c92fcf2d1 --- /dev/null +++ b/testing_codelab/step_07/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.testing_app" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.testing_app" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/testing_codelab/step_07/android/build.gradle b/testing_codelab/step_07/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_07/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_07/android/build.gradle.kts b/testing_codelab/step_07/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_07/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_07/android/gradle.properties b/testing_codelab/step_07/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_07/android/gradle.properties +++ b/testing_codelab/step_07/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_07/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_07/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_07/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_07/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_07/android/settings.gradle b/testing_codelab/step_07/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_07/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_07/android/settings.gradle.kts b/testing_codelab/step_07/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_07/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_07/ios/Podfile b/testing_codelab/step_07/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_07/ios/Podfile +++ b/testing_codelab/step_07/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_07/macos/Podfile b/testing_codelab/step_07/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_07/macos/Podfile +++ b/testing_codelab/step_07/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_07/macos/Runner.xcodeproj/project.pbxproj b/testing_codelab/step_07/macos/Runner.xcodeproj/project.pbxproj index cd83f23f77..63e39a1762 100644 --- a/testing_codelab/step_07/macos/Runner.xcodeproj/project.pbxproj +++ b/testing_codelab/step_07/macos/Runner.xcodeproj/project.pbxproj @@ -27,8 +27,8 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - B65C92C381CA9018A58BBA19 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */; }; - E791E39CFF2DC617398FBC25 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */; }; + 840FE1D1EB7AFD9A1C8868D6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */; }; + C23FE474807C53E1D81E797D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -62,8 +62,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 05D0E26C1BD6E41F4D9FB770 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 2EF285FACBA8BD63AE308F54 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; @@ -80,14 +80,14 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - C0BBA2573FD0ACA3FC5987C0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - EEDB2B6A45DF18985C1FD78A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - F2CBADA2F3474A835A24D1A1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F9A86C45070CD73FF1AEC6E5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -95,7 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B65C92C381CA9018A58BBA19 /* Pods_RunnerTests.framework in Frameworks */, + C23FE474807C53E1D81E797D /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -103,27 +103,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E791E39CFF2DC617398FBC25 /* Pods_Runner.framework in Frameworks */, + 840FE1D1EB7AFD9A1C8868D6 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1F4ACE59BF9531126BFD8920 /* Pods */ = { - isa = PBXGroup; - children = ( - F2CBADA2F3474A835A24D1A1 /* Pods-Runner.debug.xcconfig */, - EEDB2B6A45DF18985C1FD78A /* Pods-Runner.release.xcconfig */, - C0BBA2573FD0ACA3FC5987C0 /* Pods-Runner.profile.xcconfig */, - 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */, - 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */, - 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; 331C80D6294CF71000263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -151,7 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, - 1F4ACE59BF9531126BFD8920 /* Pods */, + 33CE7EC3087363FA2263FD68 /* Pods */, ); sourceTree = ""; }; @@ -175,6 +161,20 @@ path = ..; sourceTree = ""; }; + 33CE7EC3087363FA2263FD68 /* Pods */ = { + isa = PBXGroup; + children = ( + 2EF285FACBA8BD63AE308F54 /* Pods-Runner.debug.xcconfig */, + F9A86C45070CD73FF1AEC6E5 /* Pods-Runner.release.xcconfig */, + 05D0E26C1BD6E41F4D9FB770 /* Pods-Runner.profile.xcconfig */, + F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */, + E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */, + 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 33CEB47122A05771004F2AC0 /* Flutter */ = { isa = PBXGroup; children = ( @@ -202,8 +202,8 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */, - 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */, + B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */, + 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -215,7 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - A7FD17A8E725E7D4153EDBE0 /* [CP] Check Pods Manifest.lock */, + 14915E8420678D7AC4BA9CB9 /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -234,7 +234,7 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 14FA6C21241474C6BC862A81 /* [CP] Check Pods Manifest.lock */, + D4EA5C77FDBD22B74D378E14 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, @@ -322,7 +322,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 14FA6C21241474C6BC862A81 /* [CP] Check Pods Manifest.lock */ = { + 14915E8420678D7AC4BA9CB9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -337,7 +337,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -382,7 +382,7 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - A7FD17A8E725E7D4153EDBE0 /* [CP] Check Pods Manifest.lock */ = { + D4EA5C77FDBD22B74D378E14 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -397,7 +397,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -455,7 +455,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -470,7 +470,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -485,7 +485,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; diff --git a/testing_codelab/step_08/android/app/build.gradle b/testing_codelab/step_08/android/app/build.gradle deleted file mode 100644 index 10e017b858..0000000000 --- a/testing_codelab/step_08/android/app/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" -} - -android { - namespace = "com.example.testing_app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.testing_app" - // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug - } - } -} - -flutter { - source = "../.." -} diff --git a/testing_codelab/step_08/android/app/build.gradle.kts b/testing_codelab/step_08/android/app/build.gradle.kts new file mode 100644 index 0000000000..3c92fcf2d1 --- /dev/null +++ b/testing_codelab/step_08/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.testing_app" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.testing_app" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/testing_codelab/step_08/android/build.gradle b/testing_codelab/step_08/android/build.gradle deleted file mode 100644 index d2ffbffa4c..0000000000 --- a/testing_codelab/step_08/android/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/testing_codelab/step_08/android/build.gradle.kts b/testing_codelab/step_08/android/build.gradle.kts new file mode 100644 index 0000000000..89176ef44e --- /dev/null +++ b/testing_codelab/step_08/android/build.gradle.kts @@ -0,0 +1,21 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/testing_codelab/step_08/android/gradle.properties b/testing_codelab/step_08/android/gradle.properties index 2597170821..f018a61817 100644 --- a/testing_codelab/step_08/android/gradle.properties +++ b/testing_codelab/step_08/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/testing_codelab/step_08/android/gradle/wrapper/gradle-wrapper.properties b/testing_codelab/step_08/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6ba6..afa1e8eb0a 100644 --- a/testing_codelab/step_08/android/gradle/wrapper/gradle-wrapper.properties +++ b/testing_codelab/step_08/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/testing_codelab/step_08/android/settings.gradle b/testing_codelab/step_08/android/settings.gradle deleted file mode 100644 index b9e43bd376..0000000000 --- a/testing_codelab/step_08/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -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.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/testing_codelab/step_08/android/settings.gradle.kts b/testing_codelab/step_08/android/settings.gradle.kts new file mode 100644 index 0000000000..a439442c20 --- /dev/null +++ b/testing_codelab/step_08/android/settings.gradle.kts @@ -0,0 +1,25 @@ +pluginManagement { + val flutterSdkPath = run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + 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.application") version "8.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/testing_codelab/step_08/ios/Podfile b/testing_codelab/step_08/ios/Podfile index d97f17e223..e549ee22f3 100644 --- a/testing_codelab/step_08/ios/Podfile +++ b/testing_codelab/step_08/ios/Podfile @@ -29,7 +29,6 @@ flutter_ios_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_08/macos/Podfile b/testing_codelab/step_08/macos/Podfile index c795730db8..29c8eb3294 100644 --- a/testing_codelab/step_08/macos/Podfile +++ b/testing_codelab/step_08/macos/Podfile @@ -28,7 +28,6 @@ flutter_macos_podfile_setup target 'Runner' do use_frameworks! - use_modular_headers! flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/testing_codelab/step_08/macos/Runner.xcodeproj/project.pbxproj b/testing_codelab/step_08/macos/Runner.xcodeproj/project.pbxproj index cd83f23f77..63e39a1762 100644 --- a/testing_codelab/step_08/macos/Runner.xcodeproj/project.pbxproj +++ b/testing_codelab/step_08/macos/Runner.xcodeproj/project.pbxproj @@ -27,8 +27,8 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - B65C92C381CA9018A58BBA19 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */; }; - E791E39CFF2DC617398FBC25 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */; }; + 840FE1D1EB7AFD9A1C8868D6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */; }; + C23FE474807C53E1D81E797D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -62,8 +62,8 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; - 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 05D0E26C1BD6E41F4D9FB770 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 2EF285FACBA8BD63AE308F54 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; @@ -80,14 +80,14 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; - 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - C0BBA2573FD0ACA3FC5987C0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; - EEDB2B6A45DF18985C1FD78A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - F2CBADA2F3474A835A24D1A1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + F9A86C45070CD73FF1AEC6E5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -95,7 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B65C92C381CA9018A58BBA19 /* Pods_RunnerTests.framework in Frameworks */, + C23FE474807C53E1D81E797D /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -103,27 +103,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E791E39CFF2DC617398FBC25 /* Pods_Runner.framework in Frameworks */, + 840FE1D1EB7AFD9A1C8868D6 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1F4ACE59BF9531126BFD8920 /* Pods */ = { - isa = PBXGroup; - children = ( - F2CBADA2F3474A835A24D1A1 /* Pods-Runner.debug.xcconfig */, - EEDB2B6A45DF18985C1FD78A /* Pods-Runner.release.xcconfig */, - C0BBA2573FD0ACA3FC5987C0 /* Pods-Runner.profile.xcconfig */, - 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */, - 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */, - 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; 331C80D6294CF71000263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -151,7 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, - 1F4ACE59BF9531126BFD8920 /* Pods */, + 33CE7EC3087363FA2263FD68 /* Pods */, ); sourceTree = ""; }; @@ -175,6 +161,20 @@ path = ..; sourceTree = ""; }; + 33CE7EC3087363FA2263FD68 /* Pods */ = { + isa = PBXGroup; + children = ( + 2EF285FACBA8BD63AE308F54 /* Pods-Runner.debug.xcconfig */, + F9A86C45070CD73FF1AEC6E5 /* Pods-Runner.release.xcconfig */, + 05D0E26C1BD6E41F4D9FB770 /* Pods-Runner.profile.xcconfig */, + F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */, + E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */, + 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 33CEB47122A05771004F2AC0 /* Flutter */ = { isa = PBXGroup; children = ( @@ -202,8 +202,8 @@ D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( - 41141BDB78C9B7879AD87928 /* Pods_Runner.framework */, - 70DFB5FA3411B71198D038C7 /* Pods_RunnerTests.framework */, + B59DDFC21A45BE2DBC291267 /* Pods_Runner.framework */, + 92D91691EA3CA464EC6B5796 /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -215,7 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - A7FD17A8E725E7D4153EDBE0 /* [CP] Check Pods Manifest.lock */, + 14915E8420678D7AC4BA9CB9 /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -234,7 +234,7 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 14FA6C21241474C6BC862A81 /* [CP] Check Pods Manifest.lock */, + D4EA5C77FDBD22B74D378E14 /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, @@ -322,7 +322,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 14FA6C21241474C6BC862A81 /* [CP] Check Pods Manifest.lock */ = { + 14915E8420678D7AC4BA9CB9 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -337,7 +337,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -382,7 +382,7 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - A7FD17A8E725E7D4153EDBE0 /* [CP] Check Pods Manifest.lock */ = { + D4EA5C77FDBD22B74D378E14 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -397,7 +397,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -455,7 +455,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 19D22309C9361CA5BF391004 /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = F0B051DA4FD669DC0547955B /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -470,7 +470,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5BAD1EABF5C1472CA22B2C8A /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = E57E1E289434DC16083CD414 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -485,7 +485,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 2557D195CA6689B1E010EF94 /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 91AF6A71B5D41CCD460D8FDF /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1;