1. 23 Jan, 2024 1 commit
    • auto-submit[bot]'s avatar
      Reverts "hello_world app: migrate to Gradle Kotlin DSL" (#142018) · b258ca01
      auto-submit[bot] authored
      Reverts flutter/flutter#141541
      Initiated by: yusuf-goog
      This change reverts the following previous change:
      Original Description:
      This PR introduces the first app in this repo that fully uses Gradle Kotlin DSL.
      
      It also fixes a bug I found in the process – fields of `FlutterExtensions` must be `public`.
      b258ca01
  2. 22 Jan, 2024 1 commit
  3. 12 Jan, 2024 2 commits
    • Bartek Pacia's avatar
      Expose versionCode and versionName from local.properties in FlutterExtension (#141417) · fd827e3a
      Bartek Pacia authored
      This PR has no issue. I got this cool idea and decided to quickly try it out, and it works.
      
      ### Summary
      
      This will allow Flutter Developers to have less code in their Android Gradle buildscripts.
      
      ```diff
       plugins {
           id "com.android.application"
           id "dev.flutter.flutter-gradle-plugin"
           id "kotlin-android"
       }
      
      -def localProperties = new Properties()
      -def localPropertiesFile = rootProject.file("local.properties")
      -if (localPropertiesFile.exists()) {
      -    localPropertiesFile.withReader("UTF-8") { reader ->
      -        localProperties.load(reader)
      -    }
      -}
      -
      -def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
      -if (flutterVersionCode == null) {
      -    flutterVersionCode = "1"
      -}
      -
      -def flutterVersionName = localProperties.getProperty("flutter.versionName")
      -if (flutterVersionName == null) {
      -    flutterVersionName = "1.0"
      -}
      -
      -def keystorePropertiesFile = rootProject.file("keystore.properties")
      -def keystoreProperties = new Properties()
      -
       keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
      
       android {
               applicationId "pl.baftek.discoverrudy"
               minSdk 21
               targetSdk 34
      -        versionCode flutterVersionCode.toInteger()
      -        versionName flutterVersionName
      +        versionCode flutter.versionCode()
      +        versionName flutter.versionName()
           }
      ```
      
      The boilerplate that loads 'local.properties' can live in Flutter Gradle Plugin.
      
      ### Concerns
      
      I was worried about lifecycle/ordering issues, so I tested it.
      
      To Flutter Gradle Plugin, I added:
      
      ```diff
       class FlutterPlugin implements Plugin<Project> {
           //...
      
           @Override
           void apply(Project project) {
      +        project.logger.quiet("Start applying FGP")
               // ...
           }
       }
      ```
      
      and to my `android/app/build.gradle` I added:
      
      ```diff
       android {
      +    logger.quiet("Start evaluating android block")
           namespace "pl.bartekpacia.awesomeapp"
           compileSdk 34
       
           defaultConfig {
               applicationId "pl.baftek.discoverrudy"
               minSdk 21
               targetSdk 34
               versionCode flutter.versionCode()
               versionName flutter.versionName()
           }
      ```
      
      Gradle first applies the plugins (which sets versionCode and versionName on FlutterExtension), and then it executes the `android {}` extension block:
      
      ```
      $ ./gradlew :app:assembleDebug
      
      > Configure project :app
      Start applying FGP
      Start evaluating android block
      
      BUILD SUCCESSFUL in 2s
      383 actionable tasks: 10 executed, 373 up-to-date
      ```
      
      So ordering is fine.
      fd827e3a
    • Bartek Pacia's avatar
      Add support for Gradle Kotlin DSL (#140744) · 0a1af8a1
      Bartek Pacia authored
      This PR resolves #140548. It's based on my work in #118067.
      0a1af8a1
  4. 16 Nov, 2023 1 commit
  5. 09 Nov, 2023 1 commit
  6. 03 Nov, 2023 1 commit
  7. 02 Nov, 2023 2 commits
  8. 25 Oct, 2023 1 commit
  9. 24 Oct, 2023 1 commit
  10. 22 Sep, 2023 1 commit
  11. 13 Sep, 2023 1 commit
  12. 19 Apr, 2023 1 commit
  13. 29 Mar, 2023 1 commit
  14. 21 Mar, 2023 1 commit
  15. 29 Jul, 2022 1 commit
  16. 27 Jul, 2022 3 commits
  17. 26 Jul, 2022 2 commits
  18. 25 Jul, 2022 1 commit
  19. 13 Jun, 2022 1 commit
  20. 19 Apr, 2022 1 commit
  21. 28 Feb, 2022 1 commit
  22. 24 Feb, 2022 1 commit
  23. 20 Nov, 2021 1 commit
  24. 07 Nov, 2021 1 commit
  25. 05 Nov, 2021 3 commits
  26. 01 Nov, 2021 1 commit
  27. 25 Oct, 2021 1 commit
  28. 15 Oct, 2021 1 commit
  29. 08 Oct, 2021 1 commit
    • Zachary Anderson's avatar
      Revert gradle roll (#91459) · 5188df08
      Zachary Anderson authored
      * Revert "Mark last failing test after gradle update as flaky. (#91423)"
      
      This reverts commit 46a52d03.
      
      * Revert "fix android template for Gradle 7 (#91411)"
      
      This reverts commit 51d06d53.
      
      * Revert "Add explicit version for mac and windows openjdk. (#91408)"
      
      This reverts commit bf429f27.
      
      * Revert "Update the openjdk version used by linux android tests. (#91405)"
      
      This reverts commit 2144ab8b.
      
      * Revert "Migrate to Gradle 7.0.2 / AGP 7.0.1 (#90642)"
      
      This reverts commit b6459f9b.
      5188df08
  30. 07 Oct, 2021 1 commit
  31. 02 Oct, 2021 1 commit
  32. 01 Jun, 2021 1 commit
  33. 21 May, 2021 1 commit