auto-submit[bot]
f8a77225f3
Reverts "Update gradle lockfiles template" ( #142889 )
...
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 ))
2024-02-04 14:28:18 +00:00
Bartek Pacia
85888bccf2
Update gradle lockfiles template ( #140115 )
...
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 ))
2024-02-04 13:10:49 +00:00
Bartek Pacia
6facb96953
Reland "Add support for Gradle Kotlin DSL ( #140744 )" ( #142752 )
...
This PR attempts to:
- reland #140744
- reland #141541 (which is also in #142300 - I will close it once this PR is merged)
2024-02-02 20:19:42 +00:00
auto-submit[bot]
b258ca011e
Reverts "hello_world app: migrate to Gradle Kotlin DSL" ( #142018 )
...
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`.
2024-01-23 00:01:17 +00:00
Bartek Pacia
e593cdfb80
hello_world app: migrate to Gradle Kotlin DSL ( #141541 )
...
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`.
2024-01-22 21:47:20 +00:00
Bartek Pacia
fd827e3a88
Expose versionCode and versionName from local.properties in FlutterExtension ( #141417 )
...
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.
2024-01-12 18:18:32 +00:00
Bartek Pacia
0a1af8a192
Add support for Gradle Kotlin DSL ( #140744 )
...
This PR resolves #140548 . It's based on my work in #118067 .
2024-01-12 02:20:06 +00:00
Bruno Leroux
dcdf72a670
[flutter_tools] - Add queries
section to Android manifest file ( #137207 )
...
## Description
This PR adds a new section to the Android manifest file.
This section is required for https://github.com/flutter/engine/pull/44579 (because it uses `PackageManager.queryIntentActivities` API ), see:
1. https://developer.android.com/training/package-visibility?hl=en
2. https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT
3. https://developer.android.com/reference/android/content/pm/PackageManager?hl=en#queryIntentActivities(android.content.Intent,%20android.content.pm.PackageManager.ResolveInfoFlags)
## Related Issue
Android manifest update for https://github.com/flutter/flutter/issues/107603
## Tests
This PR updates the integration tests and examples Android manifest files, this will help catch error or warning related to this change.
2023-11-16 08:57:20 +00:00
Camille Simon
c66bb0a18a
[Android] Support Android 34 (take 2) ( #137967 )
...
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 .
2023-11-09 22:40:15 +00:00
auto-submit[bot]
c4ce9479bb
Reverts "[Android] Support Android 34" ( #137865 )
...
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
2023-11-03 20:14:19 +00:00
Camille Simon
675fec805a
[Android] Support Android 34 ( #137191 )
...
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
2023-11-02 22:18:11 +00:00
Bartek Pacia
3bc64e8fcf
Chore/gradle remove redundant apply ( #135348 )
...
I'm removing an unneded block of configuration from the `settings.gradle` template. It was introduced by me in #123511 . At that time, I did not know that it's unnecessary, and did not test removing it â sorry about that.
I learned that it's unnecessary recently, when [I asked a question on StackOverflow](https://stackoverflow.com/questions/77073596/whats-the-difference-between-plugins-and-pluginmanagement-plugins-in ). More context there.
2023-11-02 19:48:54 +00:00
Qun Cheng
ebc67643bd
Revert "Fix Gradle lockfiles." ( #137198 )
...
Reverts flutter/flutter#137190
2023-10-24 17:47:45 -07:00
Polina Cherkasova
ccbe221b3d
Fix Gradle lockfiles. ( #137190 )
2023-10-24 23:19:52 +00:00
Bartek Pacia
dbe0ccd885
Refactor "app plugin loader" Gradle Plugin so it can be applied using the declarative plugins {}
block ( #127897 )
...
This PR fixes #125009 .
2023-09-22 16:31:48 +00:00
Zachary Anderson
4d5a1d91e1
Bump gradle heap size limit in *everywhere* ( #134665 )
...
I'm seeing these in the bot reports every week. Hopefully this is all of
them, and hopefully 4GB is enough.
2023-09-13 10:36:24 -07:00
Bartek Pacia
51251f2e57
Refactor Flutter Gradle Plugin so it can be applied using the declarative plugins {}
block ( #123511 )
...
This PR aims to resolve #121552 .
Resources used:
- [Developing Plugins](https://docs.gradle.org/current/userguide/custom_plugins.html )
- [Using Gradle Plugins](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block )
- [Composite Builds Plugin Development Sample](https://docs.gradle.org/current/samples/sample_composite_builds_plugin_development.html )
This PR also paves way for #121541 , because apps will no longer have:
```groovy
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
```
hardcoded. Instead, they'll use:
```groovy
plugins {
// ...
id "dev.flutter.flutter-gradle-plugin" // the exact name is tentative
}
```
2023-04-19 17:56:22 +00:00
Bartek Pacia
b915f68d7a
Fix warning in flutter create
d project ("package attribute is deprecated" in AndroidManifest) ( #123426 )
...
Fix warning in `flutter create`d project ("package attribute is deprecated" in AndroidManifest)
2023-03-29 04:21:03 +00:00
Bartek Pacia
c40dd27681
Fix Gradle warning in a freshly flutter create
ed Android project ( #122290 )
...
Fix Gradle warning in a freshly `flutter create`ed Android project
2023-03-21 23:41:49 +00:00
Gary Qian
7cfbdadc33
Reland "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate benchmarks+examples" #108472 ( #108510 )
2022-07-28 19:38:07 -07:00
Kate Lovett
716533925b
Revert "Reland "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate benchmarks+examples" #108355 ( #108472 )" ( #108488 )
...
This reverts commit 1f8c490c82a5162caa39d626181fa9b96ef5e2e2.
2022-07-27 17:20:20 -05:00
Gary Qian
1f8c490c82
Reland "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate benchmarks+examples" #108355 ( #108472 )
2022-07-27 14:23:09 -07:00
Zachary Anderson
1e69683688
Revert "Reland "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate benchmarks+examples" ( #108355 )" ( #108407 )
...
This reverts commit c4b3625d62b39b03f4ac9cb1b05533545a760ded.
2022-07-26 19:30:28 -07:00
Gary Qian
c4b3625d62
Reland "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate benchmarks+examples" ( #108355 )
2022-07-26 16:23:08 -07:00
Zachary Anderson
d155bc1bad
Revert "Upgrade Gradle and AGP versions to 7.5/7.2 and migrate examples/tests ( #108197 )" ( #108349 )
...
This reverts commit ca6cecf034d9c18fcb6ea70309cc855e353aa0f8.
2022-07-25 22:20:37 -07:00
Gary Qian
ca6cecf034
Upgrade Gradle and AGP versions to 7.5/7.2 and migrate examples/tests ( #108197 )
2022-07-25 15:23:08 -07:00
Ahmed Ashour
0be4a8e9ae
Remove unneeded date comment in gradle-wrapper.properties
( #104061 )
2022-06-13 16:43:11 -07:00
Wyte Krongapiradee
a9914e78d2
Explicitly declare android:exported
in examples' manifest ( #88502 )
2022-04-19 16:29:07 -07:00
Emmanuel Garcia
9cb60c9828
Revert "reads min/target sdk versions from localproperties" ( #99191 )
2022-02-28 11:41:22 -08:00
Tacca
37a1aaf8c1
reads min/target sdk versions from localproperties ( #98450 )
2022-02-24 12:16:15 -08:00
Andrei Diaconu
924336fcee
Reland 3: Display Features ( #93240 )
2021-11-20 15:48:06 -08:00
Zachary Anderson
2468f315e0
Revert "Reland: display features ( #93117 )" ( #93204 )
...
This reverts commit 9038fac96055aa0536fddf6deb31b823e361271e.
2021-11-06 22:46:46 -07:00
Andrei Diaconu
9038fac960
Reland: display features ( #93117 )
2021-11-05 15:54:25 -07:00
Zachary Anderson
7779ad3c60
Revert "Reland engine display features ( #89511 )" ( #93098 )
...
This reverts commit 058dfd49a0be0b13937a7c0d1c926dc6d60d47bf.
2021-11-04 23:05:45 -07:00
Andrei Diaconu
058dfd49a0
Reland engine display features ( #89511 )
2021-11-04 18:37:55 -07:00
Emmanuel Garcia
c97a8622bf
Update lockfiles ( #92800 )
2021-11-01 08:58:13 -07:00
Emmanuel Garcia
4d79bb02c4
Bump Kotlin version in templates and projects ( #92052 )
2021-10-25 13:13:03 -07:00
Emmanuel Garcia
d7631275fe
Bump targetSdkVersion to 31 and organize static values ( #91719 )
2021-10-15 13:41:48 -07:00
Zachary Anderson
5188df0821
Revert gradle roll ( #91459 )
...
* Revert "Mark last failing test after gradle update as flaky. (#91423 )"
This reverts commit 46a52d03bddc74a78135d39ef2084503cc2156d7.
* Revert "fix android template for Gradle 7 (#91411 )"
This reverts commit 51d06d537fe37dd8f42002346d8545a489aed427.
* Revert "Add explicit version for mac and windows openjdk. (#91408 )"
This reverts commit bf429f2771f486602579bd5ff85ee2cfbb0794af.
* Revert "Update the openjdk version used by linux android tests. (#91405 )"
This reverts commit 2144ab8b45b8da12a94838b092c8ebc62085457f.
* Revert "Migrate to Gradle 7.0.2 / AGP 7.0.1 (#90642 )"
This reverts commit b6459f9b633279f84a92eabc6bc5f82304fc1eae.
2021-10-07 19:42:24 -07:00
Taha Tesser
b6459f9b63
Migrate to Gradle 7.0.2 / AGP 7.0.1 ( #90642 )
2021-10-06 17:01:13 -07:00
Littlegnal
1b73a35fba
Change project.buildDir in standalone subprojects property ( #91030 )
2021-10-01 17:18:05 -07:00
Emmanuel Garcia
0bccce6260
[gradle] Unlock all configurations if a local engine is used ( #83635 )
2021-06-01 13:19:03 -07:00
Emmanuel Garcia
fa5883b78e
Add Gradle lockfiles and tool to generate them ( #83067 )
2021-05-21 13:04:03 -07:00
Jonah Williams
d9638d25d7
migrate from jcenter to mavencentral ( #80908 )
2021-04-21 21:41:07 -07:00
Emmanuel Garcia
42f21fd780
Standardize how Java8 is set in gradle files ( #80600 )
2021-04-19 20:19:03 -07:00
Ahmed Saleh
740504d3e6
Refactor: use one subprojects property ( #77942 )
2021-03-12 16:28:03 -08:00
Emmanuel Garcia
8dd0de7f58
Relands: Migrate template to Gradle 6.7 and AGP 4.1.0 ( #71446 )
2020-12-01 19:01:09 -08:00
Amir Hardon
7df04fdbd3
Revert "Migrate template to Gradle 6.7 and AGP 4.1.0 ( #70808 )" ( #71096 )
...
This reverts commit 8e73bab94c6051317c9fa4279a3733b6ee2a3ef2.
2020-11-23 12:27:36 -08:00
Emmanuel Garcia
8e73bab94c
Migrate template to Gradle 6.7 and AGP 4.1.0 ( #70808 )
2020-11-20 13:05:35 -08:00
xster
df8e537f96
move compile/target sdk versions to 29 ( #62799 ) ( #63008 )
2020-08-11 14:51:02 -07:00