- 29 Feb, 2024 1 commit
-
-
Dan Field authored
This allows relanding https://github.com/flutter/engine/pull/51056. The patch introduced a change where a static member is initialized from `View.generateViewId()` instead of conditionally using that API. Without an implementation for that in android.jar, the test will fail. The test in here currently is using a fake implementation that creates errors seen below. See https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8754827734484522225/+/u/run_plugin_test/stdout#L46564_2 for failure. More detailed failure information is available locally in the `build` folder: ``` Mockito cannot mock this class: class io.flutter.embedding.android.FlutterActivity. If you're not sure why you're getting this error, please open an issue on GitHub. Java : 17 JVM vendor name : JetBrains s.r.o. JVM vendor version : 17.0.7+0-17.0.7b1000.6-10550314 JVM name : OpenJDK 64-Bit Server VM JVM version : 17.0.7+0-17.0.7b1000.6-10550314 JVM info : mixed mode OS name : Mac OS X OS version : 14.3.1 You are seeing this disclaimer because Mockito is configured to create inlined mocks. You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc. Underlying exception : org.mockito.exceptions.base.MockitoException: Cannot instrument class io.flutter.embedding.android.FlutterActivity because it or one of its supertypes could not be initialized at app//dev.flutter.plugins.integration_test.FlutterDeviceScreenshotTest.getFlutterView_returnsFlutterViewForFlutterActivity(FlutterDeviceScreenshotTest.java:32) at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base@17.0.7/java.lang.reflect.Method.invoke(Unknown Source) at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at app//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at app//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at app//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at app//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at app//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at app//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at app//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at app//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at app//org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:110) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58) at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38) at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51) at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base@17.0.7/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base@17.0.7/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base@17.0.7/java.lang.reflect.Method.invoke(Unknown Source) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at jdk.proxy1/jdk.proxy1.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176) at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:133) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:71) at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at app//worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) Caused by: org.mockito.exceptions.base.MockitoException: Cannot instrument class io.flutter.embedding.android.FlutterActivity because it or one of its supertypes could not be initialized at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168) at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399) at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190) at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410) ... 44 more Caused by: java.lang.RuntimeException: Method generateViewId in android.view.View not mocked. See http://g.co/androidstudio/not-mocked for details. at android.view.View.generateViewId(View.java) at io.flutter.embedding.android.FlutterActivity.<clinit>(FlutterActivity.java:218) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Unknown Source) at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.assureInitialization(InlineBytecodeGenerator.java:236) at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:261) at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:218) at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.lambda$mockClass$0(TypeCachingBytecodeGenerator.java:47) at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168) at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399) at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190) at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410) at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:40) at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMockType(InlineDelegateByteBuddyMockMaker.java:396) at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.doCreateMock(InlineDelegateByteBuddyMockMaker.java:355) at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMock(InlineDelegateByteBuddyMockMaker.java:334) at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:56) at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:99) at org.mockito.internal.MockitoCore.mock(MockitoCore.java:88) at org.mockito.Mockito.mock(Mockito.java:2087) at org.mockito.Mockito.mock(Mockito.java:2002) ... 44 more ```
-
- 13 Feb, 2024 1 commit
-
-
Reid Baker authored
Update dependencies to latest versions Related to #142618 Fixes #143219 - [ x I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
-
- 08 Feb, 2024 1 commit
-
-
Bartek Pacia authored
Trying to reland #140115 which I had to revert in #142889 because [it broke the tree](https://github.com/flutter/flutter/pull/140115#issuecomment-1925774719). In this PR I fixed the post-submit following tests:
-
- 07 Feb, 2024 1 commit
-
-
Gray Mackall authored
Re-sets two jvmargs that were getting cleared because we set a value for `-Xmx`. Could help with https://github.com/flutter/flutter/issues/142957. Copied from comment here https://github.com/flutter/flutter/issues/142957: >Two random things I ran into while looking into this that might help: > >1. Gradle has defaults for a couple of the jvmargs, and setting any one of them clears those defaults for the others (bug here https://github.com/gradle/gradle/issues/19750). This can cause the "Gradle daemon to consume more and more native memory until it crashes", though the bug typically has a different associated error. It seems worth it to re-set those defaults. >2. There is a property we can set that will give us a heap dump on OOM ([-XX:HeapDumpOnOutOfMemoryError](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/clopts001.html)) Mostly just a find and replace from `find . -name gradle.properties -exec sed -i '' 's/\-Xmx4G/-Xmx4G\ \-XX:MaxMetaspaceSize=2G\ \-XX:+HeapDumpOnOutOfMemoryError/g' {} \;`, with the templates and the one test that writes from a string replaced by hand. I didn't set a value for `MaxMetaspaceSize` in the template files because I want to make sure this value doesn't cause problems in ci first (changes to the templates are essentially un-revertable for those who `flutter create` while the changes exist).
-
- 04 Feb, 2024 2 commits
-
-
auto-submit[bot] authored
Reverts flutter/flutter#140115 Initiated by: bartekpacia Reason for reverting: broke the tree - [`Linux firebase_abstract_method_smoke_test`](https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20firebase_abstract_method_smoke_test/15844/overview) - [`Linux_android android_view_scroll_perf__timeline_summary`](https://ci.chromium.org/ui/p/flutter/builders/prod/Linux_android%20android_view_scroll_perf__timeline_summary/13453/overview) - [`Linux_android platform_views Original PR Author: bartekpacia Reviewed By: {gmackall} This change reverts the following previous change: Original Description: This PR updates almost* all Gradle buildscripts in the Flutter repo the `example` and `dev` (in particular, in `dev/integration_tests` and in `dev/benchmarks`) directories to apply Flutter's Gradle plugins using the declarative `plugins {}` block. *almost, because: - add-to-app (aka hybrid) apps are not migrated (related https://github.com/flutter/flutter/issues/138756) - apps that purposefully use build files to ensure backward compatibility (e.g. [`gradle_deprecated_settings`](https://github.com/flutter/flutter/tree/3.16.0/dev/integration_tests/gradle_deprecated_settings))
-
Bartek Pacia authored
This PR updates almost* all Gradle buildscripts in the Flutter repo the `example` and `dev` (in particular, in `dev/integration_tests` and in `dev/benchmarks`) directories to apply Flutter's Gradle plugins using the declarative `plugins {}` block. *almost, because: - add-to-app (aka hybrid) apps are not migrated (related https://github.com/flutter/flutter/issues/138756) - apps that purposefully use build files to ensure backward compatibility (e.g. [`gradle_deprecated_settings`](https://github.com/flutter/flutter/tree/3.16.0/dev/integration_tests/gradle_deprecated_settings))
-
- 09 Nov, 2023 1 commit
-
-
Camille Simon authored
Re-lands https://github.com/flutter/flutter/pull/137191. The fix for the issue causing that PR to be reverted was tested in this PR but ultimately landed separately in https://github.com/flutter/flutter/pull/138093.
-
- 03 Nov, 2023 1 commit
-
-
auto-submit[bot] authored
Reverts flutter/flutter#137191 Initiated by: camsim99 This change reverts the following previous change: Original Description: Adds support for Android 34 in the following ways: - Bumps integration tests compile SDK versions 33 --> 34 - Bumps template compile SDK version 33 --> 34 - Also changes deprecated `compileSdkVersion` to `compileSdk` Part of https://github.com/flutter/flutter/issues/134220
-
- 02 Nov, 2023 1 commit
-
-
Camille Simon authored
Adds support for Android 34 in the following ways: - Bumps integration tests compile SDK versions 33 --> 34 - Bumps template compile SDK version 33 --> 34 - Also changes deprecated `compileSdkVersion` to `compileSdk` Part of https://github.com/flutter/flutter/issues/134220
-
- 25 Oct, 2023 1 commit
-
-
Qun Cheng authored
Reverts flutter/flutter#137190
-
- 24 Oct, 2023 1 commit
-
-
Polina Cherkasova authored
-
- 13 Sep, 2023 1 commit
-
-
Zachary Anderson authored
I'm seeing these in the bot reports every week. Hopefully this is all of them, and hopefully 4GB is enough.
-
- 07 Sep, 2023 1 commit
-
-
Gray Mackall authored
Fixes https://github.com/flutter/flutter/issues/89683. The changes to `getFlutterView` in `FlutterDeviceScreenshot` are the fix that was required, everything else was done to get tests running (such as re-generating some lockfiles and modifying the android manifest). The code was all currently not unit tested, and there were no other easy examples to base these java unit tests off in flutter/flutter, so let me know if this approach to testing is wrong.
-
- 26 May, 2023 1 commit
-
-
Reid Baker authored
- Set exported proguard rules for consumers of integration_test using AGP 8.0 - Updated proguard usage in example to test setting custom proguard rules works. #127388 Documentation for how consumerProguardFiles works. https://developer.android.com/studio/projects/android-library#Considerations Unknown why we had to use ** instead of matching exactly.
-
- 08 May, 2023 1 commit
-
-
Reid Baker authored
- Update Gradle/AGP version and add namespace plus dependencies. https://github.com/flutter/flutter/issues/125181
-
- 03 May, 2023 1 commit
-
-
gmackall authored
[Reland] Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (#125836) This is an attempt to reland https://github.com/flutter/flutter/pull/124085. Differences from this attempt and the last: 1. Adds a check for null android studio versions and a test for this case. 2. Wraps the migrate code in a try-catch [per the suggestion here](https://github.com/flutter/flutter/pull/125728/files#r1181747899). Old PR description: This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see https://github.com/flutter/flutter/issues/122376. The PR also upgrades older gradle versions being used in integration testing to 7.4. Fixes/related to: https://github.com/flutter/flutter/issues/122376 and https://github.com/flutter/flutter/issues/123636
-
- 01 May, 2023 1 commit
-
- 28 Apr, 2023 1 commit
-
-
Reid Baker authored
Testing AGP 8.0 is not possible with the existing infra because of the java version on CI machines. See https://github.com/flutter/flutter/issues/125325 for more details. https://github.com/flutter/flutter/issues/125181
-
- 27 Apr, 2023 1 commit
-
-
gmackall authored
Add migrator to upgrade gradle version when conflict with Android Studio bundled Java version is detected (#124085) This PR adds an android project migrator that checks the version of android studio and the version of gradle for conflicts, and upgrades to 7.4 if a conflict is detected. For more detail about the particular conflict, see https://github.com/flutter/flutter/issues/122376. The PR also upgrades older gradle versions being used in integration testing to 7.4. Fixes/related to: https://github.com/flutter/flutter/issues/122376 and https://github.com/flutter/flutter/issues/123636
-
- 12 Apr, 2023 1 commit
-
-
Zachary Anderson authored
Reverts flutter/flutter#122437 This is causing several Android devicelab tests to fail on the first attempt, causing them to be marked flaky. The cause appears to be unexpected output on stderr. See: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_arm64_android%20run_release_test/5390/overview
-
- 11 Apr, 2023 1 commit
-
-
Micael Cid authored
[integration_test] upgrade androidx test to 1.4.0
-
- 21 Mar, 2023 1 commit
-
-
Bartek Pacia authored
Fix Gradle warning in a freshly `flutter create`ed Android project
-
- 07 Mar, 2023 2 commits
-
-
Zachary Anderson authored
Revert "[integration_test] upgrade androidx test to 1.4.0"
-
Micael Cid authored
[integration_test] upgrade androidx test to 1.4.0
-
- 08 Sep, 2022 1 commit
-
-
Camille Simon authored
-
- 13 Jun, 2022 1 commit
-
-
Ahmed Ashour authored
-
- 28 Feb, 2022 1 commit
-
-
Emmanuel Garcia authored
-
- 24 Feb, 2022 1 commit
-
-
Tacca authored
-
- 11 Feb, 2022 1 commit
-
-
Taha Tesser authored
-
- 20 Nov, 2021 1 commit
-
-
Andrei Diaconu authored
-
- 12 Nov, 2021 2 commits
-
-
Gary Qian authored
-
- 11 Nov, 2021 1 commit
-
-
Gary Qian authored
-
- 10 Nov, 2021 2 commits
-
-
Zachary Anderson authored
This reverts commit 6153bbef.
-
Gary Qian authored
-
- 09 Nov, 2021 2 commits
-
-
Zachary Anderson authored
This reverts commit bfe9c598.
-
Greg Spencer authored
-
- 07 Nov, 2021 1 commit
-
-
Zachary Anderson authored
This reverts commit 9038fac9.
-
- 05 Nov, 2021 2 commits
-
-
Andrei Diaconu authored
-
Zachary Anderson authored
This reverts commit 058dfd49.
-