- 07 Dec, 2023 2 commits
-
-
Camille Simon authored
Updates Gradle version for Flutter project templates and integration tests to at least 7.6.3 (changed all of those with versions below it) to fix security vulnerability. Part of fix for https://github.com/flutter/flutter/issues/138336.
-
Daco Harkes authored
Support for FFI calls with `@Native external` functions through Native assets on Android. This enables bundling native code without any build-system boilerplate code. For more info see: * https://github.com/flutter/flutter/issues/129757 ### Implementation details for Android. Mainly follows the design of the previous PRs. For Android, we detect the compilers inside the NDK inside SDK. And bundling of the assets is done by the flutter.groovy file. The `minSdkVersion` is propagated from the flutter.groovy file as well. The NDK is not part of `flutter doctor`, and users can omit it if no native assets have to be build. However, if any native assets must be built, flutter throws a tool exit if the NDK is not installed. Add 2 app is not part of this PR yet, instead `flutter build aar` will tool exit if there are any native assets.
-
- 06 Dec, 2023 1 commit
-
-
Andrew Kolos authored
## Summary Fixes https://github.com/flutter/flutter/issues/139180, where `flutter create` could crash if the `java` binary the tool found cannot be run. ## Context At startup, the tool searches for a Java installation[^1]. Unless the located installation is from [an Android Studio installation](https://github.com/flutter/flutter/blob/e1967ecabf014bf93d1731fde6a6547b06ca9c33/packages/flutter_tools/lib/src/android/android_studio.dart#L163), the tool does not verify that the binary is runnable. For more, see https://github.com/flutter/flutter/issues/139613, which tracks this inconsistency in behavior. This means that in the scenario where 1) the user does not have Android Studio installed or the java binary found within cannot be run **and** 2) the user has a) `flutter config --jdk-dir` set, b) `JAVA_HOME` set in their environment, **or** c) `java` on their system path **and** 3) the java binary we think we found during cannot be run (or `java --version` fails), **then** the user running `flutter create` with Android enabled will hit a tool crash. ## Change `Java.version` should return null if version checking fails for any reason. [This is documented behavior](https://github.com/flutter/flutter/blob/48f57621ade657b0c20ba53d513de4c3cd563abd/packages/flutter_tools/lib/src/android/java.dart#L136). Therefore, we'll update the implementation to first verify that the binary is runnable. If it isn't, it will return `null`. [^1]: We find java by calling the static `Java.find`, see: https://github.com/flutter/flutter/blob/48187028c11ca8ca10e0179705d25553e1fe2c14/packages/flutter_tools/lib/src/context_runner.dart#L271 [^2]: This PR doesn't change this, as this would be too dangerous to cherry-pick into stable.
-
- 04 Dec, 2023 1 commit
-
-
Elias Yishak authored
Relanding based on this comment: - https://github.com/flutter/flutter/pull/139278#issuecomment-1832951108 Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 30 Nov, 2023 1 commit
-
-
auto-submit[bot] authored
Reverts flutter/flutter#138896 Initiated by: CaseyHillers This change reverts the following previous change: Original Description: Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 29 Nov, 2023 1 commit
-
-
Elias Yishak authored
Related to tracker issue: - https://github.com/flutter/flutter/issues/128251 <img width="278" alt="image" src="https://github.com/flutter/flutter/assets/42216813/cee7b9be-48d6-48e5-8c39-de28d0a1f0de"> The image above shows all of the instances where we have `sendTiming`. All of the call sites have been updated to use the new `Event.timing` event from `package:unified_analytics`.
-
- 27 Nov, 2023 1 commit
-
-
Reid Baker authored
fixes flutter/flutter/issues/135402 Edge case that was reported by a user along with a test case specifically covering their output.
-
- 21 Nov, 2023 1 commit
-
-
Andrew Kolos authored
In `flutter doctor -v`, when JRE is too out-of-date to run `sdkmanager`, print a helpful error message (#138762) Closes https://github.com/flutter/flutter/issues/138132. See this issue for more information.
-
- 16 Nov, 2023 1 commit
-
-
chunhtai authored
-
- 14 Nov, 2023 1 commit
-
-
Elias Yishak authored
Part of tracker issue: - https://github.com/flutter/flutter/issues/128251 This migrates the event being sent when the "--analyze-size" is used in a flutter invocation The only file that had this event being sent from is `packages/flutter_tools/lib/src/base/analyze_size.dart`
-
- 09 Nov, 2023 2 commits
-
-
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.
-
Reid Baker authored
Fixes #135402 Add fallback logic for a different format of java version output and handle no patch versions. Add tests for new logic output to prevent regressions.
-
- 08 Nov, 2023 1 commit
-
-
Christopher Fujino authored
Per discord discussion, building an AAR out of a plugin project has not worked for years, so let's just disable the functionality. Context: https://github.com/flutter/flutter/issues/137564
-
- 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 3 commits
-
-
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
-
Reid Baker authored
Fixes #137600 Protect flutter analyze --suggestions from null error when AGP value is missing Update template with a reference to new agp definition location Look for AGP version being set in settings.gradle (change to templates happened in https://github.com/flutter/flutter/commit/dbe0ccd8853dabdcb0f94ce2cdef892a1b10e48a#diff-20537fb84ee37894a3f3d9723a06bcf2674290ee25aa83332c2524a1f7546a6d
-
Gray Mackall authored
Fixes https://github.com/flutter/flutter/issues/130808. Short context is that the migration guide doesn't help when a user has a newer java version than 17, and this tells them how to fix the error in that situation. This is an alternative to https://github.com/flutter/flutter/pull/131354, because I think it is a bad idea to introduce branching in how we handle this error with some specialized regexp.
-
- 01 Nov, 2023 1 commit
-
-
Elias Yishak authored
Related to tracker issue: - https://github.com/flutter/flutter/issues/128251
-
- 12 Oct, 2023 1 commit
-
-
Derek Xu authored
-
- 11 Oct, 2023 1 commit
-
-
- 20 Sep, 2023 1 commit
-
-
Camille Simon authored
Adds warning to `flutter create` command that checks if detected Java version is compatible with the template AGP and template Gradle versions. If a developer is building for Android and their Java version is incompatible with either the AGP or Gradle versions that Flutter currently supports by default for new Flutter projects, then - a warning will show noting the incompatibility and - steps will be shown to fix the issue, the recommended option being to configure a new compatible Java version given that Flutter knows we can support the template Gradle/AGP versions and updating them manually may be risky (feedback on this approach would be greatly appreciated!) Given that the template AGP and Gradle versions are compatible, this PR assumes that the detected Java version may only conflict with one of the template AGP or Gradle versions because: - the minimum Java version for a given AGP version is less than the maximum Java version compatible for the minimum Gradle version required for that AGP version (too low a Java version will fail AGP compatibility test, but not Gradle compatibility). - the maximum Java version compatible with minimum Gradle version for a given AGP version is higher than minimum Java version required for that AGP version (too high a Java version will fail Gradle compatibility test, but not AGP compatibility test). Fixes https://github.com/flutter/flutter/issues/130515 in the sense that `flutter create foo`; `cd foo`; `flutter run` should always be successful.
-
- 12 Sep, 2023 1 commit
-
-
Michael Goderbauer authored
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2. Part of https://github.com/flutter/flutter/issues/134476.
-
- 24 Aug, 2023 1 commit
-
-
Andrew Kolos authored
Fixes #133055
-
- 18 Aug, 2023 1 commit
-
-
chunhtai authored
1. Remove vm service registration 2. combine print<variant>ApplicationId and print<variant>AppLinkDomain into one task dump<variant>AppLinkSettings, which dump all the data in a json file The deeplink validation tool will be a static app in devtool instead of regular app. A Static app doesn't require a running app; therefore, we can't call these API through vmservices. I decided to convert these API into flutter analyzer command, which will be done in a separate PR https://github.com/flutter/flutter/pull/131009. The reason these print tasks are converted into file dumps is to reduce the amount of data encoding and decoding. Instead of passing data through stdout, the devtool can read the files generated by gradle tasks instead.
-
- 16 Aug, 2023 1 commit
-
-
Matan Lurey authored
Partial work towards https://github.com/flutter/flutter/issues/132245. I also couldn't help myself to do a very minor refactor and add some comments to `LocalEngineInfo` because I was getting confused myself implementing it.
-
- 15 Aug, 2023 1 commit
-
-
Matan Lurey authored
Partial work towards https://github.com/flutter/flutter/issues/132245. I made a minor refactor to test-only code because it was too confusing to have 2 optional parameters that are technically required together, but otherwise all other changes *should* be pass throughs. That being said, I can't say I totally understand the Gradle stuff so I could use a hand double checking that.
-
- 14 Jul, 2023 1 commit
-
-
gmackall authored
This migrator will upgrade the minSdkVersion used in the [module-level build.gradle](https://developer.android.com/build#module-level) file to flutter.minSdkVersion. The PR also makes a small refactor to `AndroidProject` to add a getter for the module level build.gradle file, and uses that getter in places where we were getting that file (previously it was being gotten directly via `hostAppGradleRoot.childDirectory('app').childFile('build.gradle')`. Part of the work for deprecating support for the Jelly Bean android apis.
-
- 21 Jun, 2023 1 commit
-
-
Christopher Fujino authored
Works around part of https://github.com/flutter/flutter/issues/128866
-
- 07 Jun, 2023 2 commits
-
-
chunhtai authored
fixes https://github.com/flutter/flutter/issues/120408 Added two gradle tasks, one for grabing the application id, one for grabbing app link domains. Added a new vmservices to call these two gradle tasks and return the result. The expected work flow is that the devtool will first call a vmservices to grab all avaliable build variants. It will then choose one of the build variant and call this new services to get application id and app link domains.
-
Andrew Kolos authored
Closes https://github.com/flutter/flutter/issues/106416. This PR adds a new `flutter config` setting named `jdk-dir`. When set, the tool will use the JDK found at this location for all Java-dependent tool operations such as building Android apps via gradle and running Android SDK tools.
-
- 01 Jun, 2023 2 commits
-
-
Andrew Kolos authored
Fixes #122081. When validating an Android Studio installation, add a warning validation message when we are unable to detect the version. This is because we have logic throughout the tool (JDK/JRE-searching) that is at higher risk of failing when we don't know the version.
-
Andrew Kolos authored
Fixes #124252, finishing work on the umbrella tracking issue, #126126. Essentially, after this PR, no (non-test) code should be be referencing/invoking the java home or binary paths.
-
- 26 May, 2023 1 commit
-
-
Phil Quitslund authored
The newly updated lint will soon flag for-each in collections. See discussion: https://github.com/dart-lang/linter/pull/4383 /cc @goderbauer
-
- 20 May, 2023 1 commit
-
-
Andrew Kolos authored
Relands #126086, which was reverted by #126569.
-
- 19 May, 2023 1 commit
-
-
Felix Angelov authored
Fixes the `findBundleFile` method in `gradle.dart` to correctly locate app bundles generated from multiple flavor dimensions. - closes https://github.com/flutter/flutter/issues/92316 - closes https://github.com/flutter/flutter/issues/65264
-
- 15 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 11 May, 2023 2 commits
-
-
Andrew Kolos authored
Reverts flutter/flutter#126086. This PR changed the interfaces of some classes, namely `AndroidSdk`, and deleted a global. These classes had custom overrides in g3 that were not updated with a g3fix, so this PR has broken tests. See https://b.corp.google.com/issues/281945232 (non-public link)
-
Andrew Kolos authored
This is the first step in unifying Java-finding logic across the tool. If curious, see #126029 for an example of what all the changes will probably entail. Moves java-related functionality like `AndroidSdk.findJavaHome` to a new class, `Java`. See tracking issue https://github.com/flutter/flutter/issues/126126 for more.
-
- 05 May, 2023 1 commit
-
-
Kevin Moore authored
-
- 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
-