Commit Graph

39 Commits

Author SHA1 Message Date
Matan Lurey
9528c1849e
Disable the ability to opt-out of explicit-package-dependencies. (#169283)
This feature landed opt-in in 3.29 and opt-out in 3.32:


https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source

In this PR, we remove the ability to use `flutter config
--no-enable-explicit-package-dependencies`, and remove all places that
opt-in to the flag (which are currently NOPs). Follow-up PRs will
refactor tests relying on the older behavior, and then finally remove
`package:flutter_gen` and the `.flutter-plugins` (legacy format) file
guarded by this flag.
2025-05-22 21:42:50 +00:00
Matan Lurey
dee15f56bb
Re-land #162644: Remove --verbose from devicelab task executions. (#163017)
Re-lands https://github.com/flutter/flutter/pull/162644.

Reverts 7569fbfce5, with the change to
`ios_app_with_extensions_test.dart` omitted, which is intentional
(`--verbose` is load-bearing and used to check for a particular
message).
2025-02-10 21:53:55 +00:00
auto-submit[bot]
7569fbfce5
Reverts "Remove --verbose from devicelab task executions. (#162644)" (#162853)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#162644
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: At least one post-submit test depends on the
output of `--verbose`.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {cbracken, reidbaker, jonahwilliams}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
These can be useful, but were probably left in past the point where they
are always useful:

- https://github.com/flutter/flutter/pull/58018
- https://github.com/flutter/flutter/pull/56342
- https://github.com/flutter/flutter/pull/74080

... compared to the cost of reading these logs with 1000s of lines of
`stdout: ` output.

Will ask the CI gods if any of this was load-bearing before sending out
for review.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-02-07 01:27:47 +00:00
Matan Lurey
fdeb7b93aa
Remove --verbose from devicelab task executions. (#162644)
These can be useful, but were probably left in past the point where they
are always useful:

- https://github.com/flutter/flutter/pull/58018
- https://github.com/flutter/flutter/pull/56342
- https://github.com/flutter/flutter/pull/74080

... compared to the cost of reading these logs with 1000s of lines of
`stdout: ` output.

Will ask the CI gods if any of this was load-bearing before sending out
for review.
2025-02-07 00:25:20 +00:00
Matan Lurey
0e59f0f64c
flutter build aar regenerates tooling between each build-mode step (#162705)
Closes https://github.com/flutter/flutter/issues/162703.

I still need to do a similar change for `ios|macos`-`framework` in
https://github.com/flutter/flutter/issues/162704.

I added two unit tests, as well as opted in an integration test to the
flag (it will become the default in
https://github.com/flutter/flutter/pull/160289).

/cc @reidbaker @gmackall.
2025-02-06 17:03:02 +00:00
Michael Goderbauer
5491c8c146
Auto-format Framework (#160545)
This auto-formats all *.dart files in the repository outside of the
`engine` subdirectory and enforces that these files stay formatted with
a presubmit check.

**Reviewers:** Please carefully review all the commits except for the
one titled "formatted". The "formatted" commit was auto-generated by
running `dev/tools/format.sh -a -f`. The other commits were hand-crafted
to prepare the repo for the formatting change. I recommend reviewing the
commits one-by-one via the "Commits" tab and avoiding Github's "Files
changed" tab as it will likely slow down your browser because of the
size of this PR.

---------

Co-authored-by: Kate Lovett <katelovett@google.com>
Co-authored-by: LongCatIsLooong <31859944+LongCatIsLooong@users.noreply.github.com>
2024-12-19 20:06:21 +00:00
Matan Lurey
d29a888bf2
Replace \r\n code with Dart SDK standard conventions. (#159346)
Also deleted a file that appeared to be unused.
2024-11-22 19:41:08 +00:00
Mikhail Novoseltsev
0975e612c0
[tool][android] Allow --target-platform work properly with --debug mode (#154476)
This PR addresses an issue where the `--target-platform` flag was not being respected when building APKs in debug mode. Previously, debug builds would always include `x86` and `x64` architectures, regardless of the specified target platform. This change ensures that the `--target-platform` flag is honored across all build modes, including debug.

To achieve this, `BuildApkCommand` has been slightly changed to become responsible for list of archs that should be built in the current run,rather than just parsing arguments. Previously, this responsibility was distributed to gradle, which could be frustrating (in my opinion)

Fixes #153359
2024-10-01 15:24:53 +00:00
Gray Mackall
f964f15dcb
Fix flutter build aar for modules that use a plugin (#154757)
https://github.com/flutter/flutter/pull/151675 bumped module templates to AGP 8.1.

In doing so, I tried to work around a behavior change [that was new in AGP 8.0](https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes):
> AGP 8.0 creates no SoftwareComponent by default. Instead AGP creates SoftwareComponents only for variants that are configured to be published using the publishing DSL.

by using AGP's publishing DSL to define which variants to publish in the module's ephemeral gradle files:
```
android.buildTypes.all {buildType ->
    if (!android.productFlavors.isEmpty()) {
        android.productFlavors.all{productFlavor ->
            android.publishing.singleVariant(productFlavor.name + buildType.name.capitalize()) {
                withSourcesJar()
                withJavadocJar()
            }
        }
    } else {
        android.publishing.singleVariant(buildType.name) {
            withSourcesJar()
            withJavadocJar()
        }
    }
}
```

The problem is that this doesn't get applied to the plugin projects used by the module, so if a module uses any plugin it breaks. This PR fixes that by applying similar logic, but to each project (not just the module's project).

Tested manually with https://github.com/gmackall/GrayAddToApp, and also re-enabled an old test that tested this use case as a part of the PR.

Fixes: https://github.com/flutter/flutter/issues/154371
2024-09-10 16:42:22 +00:00
林军华
8e30cc9c56
Revert file naming convention of .aar files to support fuzzy matching in build.gradle (#112149) 2022-10-04 03:37:22 +00:00
Michael Goderbauer
10a7c9ba22
Unify analysis options (#108462) 2022-07-28 09:07:49 -07:00
Alexandre Ardhuin
93a74ca9f2
remove unused members in executable libs (#107464) 2022-07-12 21:41:08 +00:00
Elsabe Ros
606e91ad63
Use the maven-publish plugin to publish AAR files. (#101891) 2022-04-19 16:34:07 -07:00
Zachary Anderson
6190c5df09
Revert "Use the maven-publish plugin to publish AAR files. (#101276)" (#101827)
This reverts commit 2b0255f0d9.
2022-04-13 08:12:07 -07:00
Elsabe Ros
2b0255f0d9
Use the maven-publish plugin to publish AAR files. (#101276) 2022-04-12 22:19:08 -07:00
Emmanuel Garcia
b528310f58
Specify Kotlin version in modules and refactor (#101315) 2022-04-07 13:20:33 -07:00
Emmanuel Garcia
5c6918933e
Migrate AGP and Gradle versions to 7.1.2/7.4 (#99723) 2022-03-30 20:30:09 -07:00
Darren Austin
f6e5227b28
Migrate the first 3rd of the devicelab tasks to null safety. (#86374) 2021-07-13 16:45:09 -07:00
Darren Austin
28cb43e601
Revert "Migrate core devicelab tasks a-f null safety. (#85996)" (#86268)
This reverts commit 9d3563a8ea.
2021-07-11 23:17:00 -07:00
Darren Austin
9d3563a8ea
Migrate core devicelab tasks a-f null safety. (#85996) 2021-07-11 20:32:38 -07:00
Jenn Magder
94a41cde83
Mixed null safety in dev/devicelab (#84017) 2021-06-05 02:29:03 -07:00
Hattomo (TomohiroHattori)
08a70e7ac8
Enable avoid_escaping_inner_quotes lint (#81153) 2021-05-19 09:54:02 -07:00
Emmanuel Garcia
42f21fd780
Standardize how Java8 is set in gradle files (#80600) 2021-04-19 20:19:03 -07:00
Casey Hillers
9e206a0c93
Refactor devicelab logic to use TaskResult instead of JSON (#67550) 2020-10-07 16:37:09 -07:00
godofredoc
35c8f19f1e
Fix windows hostonly_devicelab tests. (#66195) 2020-09-22 12:07:05 -07:00
Michael R Fairhurst
7f3c9b6bda
Remove unused 'dart:async' imports. (#65568) 2020-09-16 14:14:06 -07:00
Chris Yang
2e63b7d4f8
Add --platforms to flutter create -t plugin command (#59507) 2020-06-23 17:38:03 -07:00
Emmanuel Garcia
4465ff9e3d
Prevent building non-android plugins in build aar (#58018) 2020-05-27 10:11:36 -07:00
sjindel-google
ee1fa94b4d
Make build_aar_*_tests actually use release builds. (#48893) 2020-01-16 18:59:33 +01:00
Ian Hickson
449f4a6673
License update (#45373)
* Update project.pbxproj files to say Flutter rather than Chromium

Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright.

* Update the copyright notice checker to require a standard notice on all files

* Update copyrights on Dart files. (This was a mechanical commit.)

* Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine.

Some were already marked "The Flutter Authors", not clear why. Their
dates have been normalized. Some were missing the blank line after the
license. Some were randomly different in trivial ways for no apparent
reason (e.g. missing the trailing period).

* Clean up the copyrights in non-Dart files. (Manual edits.)

Also, make sure templates don't have copyrights.

* Fix some more ORGANIZATIONNAMEs
2019-11-27 15:04:02 -08:00
Ian Hickson
1ce4a4f36f
Make sure all our .dart files have license headers (#44467) 2019-11-08 16:53:21 -08:00
xster
604f176194 Add more flutter build ios-framework tests before the impending jonahpocalypse (#44308) 2019-11-07 13:12:56 -08:00
Emmanuel Garcia
ee032f67c7
flutter build aar should also build plugins as AARs (#43994) 2019-11-02 09:46:25 -07:00
Emmanuel Garcia
30493a35b6
Test Gradle on Windows (#42709) 2019-10-21 16:42:46 -07:00
Emmanuel Garcia
1d2eaaf204
Ensure that flutter assets are copied in the AAR (#42306) 2019-10-09 16:29:20 -07:00
Emmanuel Garcia
bd02e4f573
Test that modules built as AAR contain the right assets and artifacts (#37206) 2019-07-30 13:38:06 -07:00
Emmanuel Garcia
242a4225a1
Flutter build aar (#36732)
`flutter build aar`

This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.

This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.

This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.

`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.

In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:


repositories {
    maven {
        url "<path-to-flutter-module>build/host/outputs/repo"
    }
}

dependencies {
    implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
       transitive = true
    }
}
2019-07-23 09:27:42 -07:00
Emmanuel Garcia
c9b466f9e2
Revert "Add flutter build aar (#35217)" (#36731)
This reverts commit 11460b8378.
2019-07-22 22:07:59 -07:00
Emmanuel Garcia
11460b8378
Add flutter build aar (#35217)
`flutter build aar`

This new build command works just like `flutter build apk` or `flutter build appbundle`, but for plugin and module projects.

This PR also refactors how plugins are included in app or module projects. By building the plugins as AARs, the Android Gradle plugin is able to use Jetifier to translate support libraries into AndroidX libraries for all the plugin's native code. Thus, reducing the error rate when using AndroidX in apps.

This change also allows to build modules as AARs, so developers can take these artifacts and distribute them along with the native host app without the need of the Flutter tool. This is a requirement for add to app.

`flutter build aar` generates POM artifacts (XML files) which contain metadata about the native dependencies used by the plugin. This allows Gradle to resolve dependencies at the app level. The result of this new build command is a single build/outputs/repo, the local repository that contains all the generated AARs and POM files.

In a Flutter app project, this local repo is used by the Flutter Gradle plugin to resolve the plugin dependencies. In add to app case, the developer needs to configure the local repo and the dependency manually in `build.gradle`:


repositories {
    maven {
        url "<path-to-flutter-module>build/host/outputs/repo"
    }
}

dependencies {
    implementation("<package-name>:flutter_<build-mode>:1.0@aar") {
       transitive = true
    }
}
2019-07-22 20:46:01 -07:00