From 5fd7aa2ed70dfb50b3690f23d47ba209b34cf52d Mon Sep 17 00:00:00 2001 From: "auto-submit[bot]" <98614782+auto-submit[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 17:26:26 +0000 Subject: [PATCH] Reverts "Make `build_android_host_app_with_module_aar` build using an aar (#169171)" (#169287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reverts: flutter/flutter#169171 Initiated by: gmackall Reason for reverting: this is failing on presubmits of prs that make engine changes, presumably due to some missing gradle configuration to handle that special case in resolving the engine binaries. Original PR Author: gmackall Reviewed By: {mboetger} This change reverts the following previous change: Fixes https://github.com/flutter/flutter/issues/169165. `build_android_host_app_with_module_aar` was unfortunately not depending on the module as an aar, but as source (something we have a different test for, and something that you would not expect given the name of the test 🤦 ) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md Co-authored-by: auto-submit[bot] --- .../build_android_host_app_with_module_aar.dart | 14 ++------------ .../app/build.gradle | 9 +-------- .../settings.gradle | 16 ++-------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/dev/devicelab/bin/tasks/build_android_host_app_with_module_aar.dart b/dev/devicelab/bin/tasks/build_android_host_app_with_module_aar.dart index 85f28b75049..ddd685646be 100644 --- a/dev/devicelab/bin/tasks/build_android_host_app_with_module_aar.dart +++ b/dev/devicelab/bin/tasks/build_android_host_app_with_module_aar.dart @@ -214,17 +214,6 @@ class ModuleTest { return TaskResult.failure('Failed to build editable host .apk'); } - section('Flutter build aar succeeds'); - - await inDirectory(projectDir, () async { - await flutter( - 'build', - options: ['aar', '--no-profile'], - output: stdout, - stderr: stderr, - ); - }); - section('Add to existing Android app'); final Directory hostApp = Directory(path.join(tempDir.path, 'hello_host_app')); @@ -248,12 +237,13 @@ class ModuleTest { ); // Modify gradle version to the passed in version. + // This is somehow the wrong file. final File gradleWrapperProperties = File( path.join(hostApp.path, 'gradle', 'wrapper', 'gradle-wrapper.properties'), ); String propertyContent = await gradleWrapperProperties.readAsString(); propertyContent = propertyContent.replaceFirst('REPLACEME', gradleVersion); - section('Modify gradle wrapper file contents'); + section(propertyContent); await gradleWrapperProperties.writeAsString(propertyContent, flush: true); // Modify AGP version to the passed in version. diff --git a/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle b/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle index f21e519eb06..518a685691b 100644 --- a/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle +++ b/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/app/build.gradle @@ -29,15 +29,8 @@ android { versionCode 1 versionName "1.0" } - buildTypes { - profile { - initWith debug - } - } } dependencies { - debugImplementation 'io.flutter.devicelab.hello:flutter_debug:1.0' - profileImplementation 'io.flutter.devicelab.hello:flutter_profile:1.0' - releaseImplementation 'io.flutter.devicelab.hello:flutter_release:1.0' + implementation project(':flutter') } diff --git a/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/settings.gradle b/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/settings.gradle index 28620d5e2b9..6c933debbaf 100644 --- a/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/settings.gradle +++ b/dev/integration_tests/pure_android_host_apps/android_host_app_v2_embedding/settings.gradle @@ -2,18 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) - repositories { - google() - mavenCentral() - maven { - url = uri("https://storage.googleapis.com/download.flutter.io") - } - maven { - url = uri("../hello/build/host/outputs/repo") - } - } -} - include ':app' +setBinding(new Binding([gradle: this])) +evaluate(new File(settingsDir.parentFile, 'hello/.android/include_flutter.groovy'))