- 18 Apr, 2023 1 commit
-
-
- 05 Apr, 2023 2 commits
-
-
Andrew Kolos authored
Normalize Java SDK (JDK) location logic across the tool
-
Reid Baker authored
https://github.com/flutter/flutter/issues/123917 Doc covering a broad set of issues related to android studio updating. https://docs.google.com/document/d/1hTXkjbUrBnXgu8NQsth1c3aEqo77rWoEj8CcsQ39wwQ/edit?pli=1# Specifically this pr: - Adds new functions to find a projects AGP, Gradle and java versions, and tests. - Adds new functions that take versions and parse if the versions are compatible with each other, and tests. - Adds validator for `flutter analyze --suggestions` that evaluates the java/gradle/agp versions and checks if they are compatible, and integration test. - Updates the version of gradle used by dev/integration_tests/flutter_gallery/ to the minimum supported by java 18 so that the integration tests pass (It is unknown why the java version is 18.9 instead of 11) - Moves `isWithinVersionRange` to version.dart, and tests. - Adds FakeAndroidStudio to fakes to be used in multiple tests but does not remove existing copies. Metrics will be included as part of the definition of done for this bug but not as part of this cl. It is already too big. Known work still left in this pr: * Understand why analyze integration tests are failing. Example output if Java and gradle are not compatible: ``` ┌───────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information. │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └───────────────────────────────────────────────────────────────────┘ ``` Example output if Gradle and AGP are not compatible ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions. │ │ │ │ Gradle Version: 7.0.2, AGP Version: 7.4.2 │ │ │ │ Update gradle to at least "7.5". │ │ See the link below for more information: │ │ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` Example output if Java/Gradle/Agp are not compatible. ``` ┌─────────────────────────────────────────────────────────────────────────────┐ │ General Info │ │ [✓] App Name: espresso_example │ │ [✓] Supported Platforms: android │ │ [✓] Is Flutter Package: yes │ │ [✓] Uses Material Design: yes │ │ [✓] Is Plugin: no │ │ [✗] Java/Gradle/Android Gradle Plugin: Incompatible Gradle/AGP versions. │ │ │ │ Gradle Version: 7.0.2, AGP Version: 7.4.2 │ │ │ │ Update gradle to at least "7.5". │ │ See the link below for more information: │ │ https://developer.android.com/studio/releases/gradle-plugin#updating-gradle │ │ │ │ Incompatible Java/Gradle versions. │ │ │ │ Java Version: 17.0.6, Gradle Version: 7.0.2 │ │ │ │ See the link below for more information: │ │ https://docs.gradle.org/current/userguide/compatibility.html#java │ │ │ └─────────────────────────────────────────────────────────────────────────────┘ ``` Commit messages - Add function to gradle_utils.dart that gets the gradle version from wrapper or system and add a test for each situation - Add method to get agp version, add method to validate agp against gradle version, update documentation, add tests for agp validation. - Update dart doc for validateGradleAndAgp to describe where the info came from and corner case behavior, create function to validate java and gradle and hardcode return to false - Fill out and test java gradle compatibility function in gradle_utils - Hook up java gradle evaluateion to hasValidJavaGradleAgpVersions with hardcoded java version - Add java --version output parsing and tests - Add getJavaBinary test - Update comment in android_sdk for mac behavior with java_home -v ## 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]. - [ ] All existing and new tests are passing.
-
- 23 Jan, 2023 1 commit
-
-
Michael Goderbauer authored
* dart fix --apply * manual fixes * fix after merge conflicts * review
-
- 16 Sep, 2022 1 commit
-
-
Christopher Fujino authored
-
- 17 Nov, 2021 1 commit
-
-
Konoshenko Vlad authored
-
- 02 Nov, 2021 1 commit
-
-
Jenn Magder authored
-
- 26 Aug, 2021 1 commit
-
-
Jenn Magder authored
-
- 01 Jul, 2021 1 commit
-
-
Ahmed Ashour authored
-
- 22 May, 2021 1 commit
-
-
Jonah Williams authored
-
- 07 Apr, 2021 1 commit
-
-
Jenn Magder authored
-
- 02 Apr, 2021 2 commits
-
-
Jenn Magder authored
-
Jenn Magder authored
-
- 25 Mar, 2021 1 commit
-
-
Gurjinder Partola authored
-
- 15 Mar, 2021 1 commit
-
-
Gurjinder Partola authored
-
- 24 Feb, 2021 1 commit
-
-
Jonah Williams authored
-
- 16 Feb, 2021 1 commit
-
-
Jonah Williams authored
-
- 27 Jan, 2021 1 commit
-
-
Jonah Williams authored
* opt out the flutter tool * oops EOF * fix import * Update tool_backend.dart * Update daemon_client.dart * fix more
-
- 06 Nov, 2020 1 commit
-
-
Jonah Williams authored
-
- 26 Oct, 2020 1 commit
-
-
Jonah Williams authored
* [flutter_tools] simplication of application store logic * maybe return null * fix install tests * Clean up imports * revert windows test * remove unused import
-
- 14 Oct, 2020 1 commit
-
-
Jenn Magder authored
-
- 27 Aug, 2020 1 commit
-
-
Jonah Williams authored
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs. In general, not much can be done with an Android Device if the actual SDK is not installed. Reland with fixed code + tests for null SDK + adb in AndroidDeviceDiscovery
-
- 26 Aug, 2020 1 commit
-
-
Jenn Magder authored
Revert "[flutter_tools] avoid creating Android Devices if AndroidSDK cannot be found (#64524)" (#64602) This reverts commit 47596c62.
-
- 25 Aug, 2020 1 commit
-
-
Jonah Williams authored
Avoid creating AndroidDevice discovery if the SDK cannot be located. Previously the tool would use which/where adb, however this required us to handle the AndroidSdk class being potentially null - which required an additional layer of indirection around all access. Sometimes these were forgotten leading to NPEs. In general, not much can be done with an Android Device if the actual SDK is not installed.
-
- 20 Aug, 2020 1 commit
-
-
xster authored
-
- 19 Aug, 2020 1 commit
-
-
Jonah Williams authored
Attempt to simplify the Android SDK interface ahead of refactoring it. The locateAndroidSdk static method is called at startup to locate the android SDK, returning null if it cannot be found. These helper methods attempted to first look up the AndroidSDK if it was already null - which could only cover the case where someone installed the Android SDK while flutter was running (possibly through an IDE)
-
- 23 Jun, 2020 1 commit
-
-
Jenn Magder authored
-
- 06 May, 2020 1 commit
-
-
Zachary Anderson authored
-
- 05 May, 2020 1 commit
-
-
Jenn Magder authored
-
- 06 Apr, 2020 1 commit
-
-
Jonah Williams authored
-
- 31 Mar, 2020 2 commits
-
-
Jenn Magder authored
-
Mubarak Imam authored
-
- 25 Mar, 2020 2 commits
-
-
Jenn Magder authored
-
Jenn Magder authored
-
- 06 Mar, 2020 1 commit
-
-
Zachary Anderson authored
* Reland: [flutter_tool] Where possible, catch only subtypes of Exception * Add armv7f to getIOSArchForName
-
- 05 Mar, 2020 1 commit
-
-
Jonah Williams authored
-
- 04 Mar, 2020 2 commits
-
-
Jenn Magder authored
This reverts commit 57c6721c.
-
Flutter GitHub Bot authored
-
- 28 Feb, 2020 2 commits
-
-
Zachary Anderson authored
This reverts commit 9de7787f.
-
Zachary Anderson authored
-