Commit Graph

157 Commits

Author SHA1 Message Date
Emmanuel Garcia
b6e92003c8
Add .flutter-plugins-dependencies to the project, which contains the app's plugin dependency graph (#45379) 2019-11-22 15:02:20 -08:00
Jonah Williams
df3505c1f3
Improve performance of build APK (~50%) by running gen_snapshot concurrently (#44534) 2019-11-19 11:26:07 -08:00
Jonah Williams
978fada33c
Refactor flutter.gradle to use assemble directly (#43876)
Removes multiple re-entrant calls of bundle and aot and replaces them with a single call to assemble. This restores full caching and will allow follow-up performance improvements when building multiple ABIs
2019-11-08 12:41:24 -08:00
Emmanuel Garcia
114150b791
Don't add x86 nor x64 when building a local engine in debug mode (#44302) 2019-11-06 15:22:54 -08:00
Emmanuel Garcia
bb8cf609ec
Build local maven repo when using local engine (#44243) 2019-11-06 12:52:37 -08:00
Emmanuel Garcia
ee032f67c7
flutter build aar should also build plugins as AARs (#43994) 2019-11-02 09:46:25 -07:00
Jonah Williams
79bc6cafc5
implement build aot with assemble for Android target platforms (#43282) 2019-10-30 15:23:25 -07:00
Emmanuel Garcia
53cc59f82c
Add transitive dependencies back (#42441) 2019-10-10 12:47:34 -07:00
Jonah Williams
10ddb7db78 remove println (#42378) 2019-10-09 17:49:31 -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
00f82d9021 Use mergeResourcesProvider instead of deprecated mergeResources (#41942) 2019-10-03 20:42:43 -07:00
Emmanuel Garcia
ed49a79516 Include embedding transitive dependencies in plugins (#41885) 2019-10-03 20:42:24 -07:00
Emmanuel Garcia
2466ca5bb0
Copy Flutter assets before merging the rest of resources (#41333) 2019-09-27 10:53:37 -07:00
Emmanuel Garcia
975e770e13
Add embedding as API dependency instead of compile only dependency (#41142) 2019-09-25 17:59:17 -07:00
Emmanuel Garcia
16d408a7a0
Reland #40810: Re-enable AAR plugins when an AndroidX failure occurred (#41160) 2019-09-24 16:16:22 -07:00
Emmanuel Garcia
2c8813c86c
Revert "Re-enable AAR plugins when an AndroidX failure occurred (#40810)" (#41042)
This reverts commit 96482eeb5c.
2019-09-23 09:28:38 -07:00
Emmanuel Garcia
407668f4d5
Stop using deprecated features from Gradle (#40900) 2019-09-20 08:29:53 -07:00
Emmanuel Garcia
96482eeb5c
Re-enable AAR plugins when an AndroidX failure occurred (#40810) 2019-09-20 08:28:52 -07:00
Amir Hardon
4e108b6f90
Exclude non Android plugins from Gradle build (#40640)
Before this change, having an Android app depend on a plugin that has no android implementation resulted in a Gradle build failure.

This scenario is likely to become more common if we're enabling federated plugins, as the package implementing just the desktop implementation of a plugin won't have an Android implementation.

This changes the Gradle plugin to not try to build any plugins that doesn't have an android/build.gradle file.
2019-09-18 16:42:20 -07:00
Emmanuel Garcia
8a1bf5b827
Reland #39157 (#39798) 2019-09-17 08:19:33 -07:00
Emmanuel Garcia
0df1594ba2
Enable the resource shrinker (#40610) 2019-09-16 15:27:05 -07:00
Emmanuel Garcia
4d404da6df
Update Kotlin and Gradle version (#40181) 2019-09-13 19:37:07 -07:00
Emmanuel Garcia
2c857b9370
Enable R8 (#40453) 2019-09-13 19:06:40 -07:00
Emmanuel Garcia
f29524a150
Rename useProguard method, so Gradle doesn't get confused (#40440) 2019-09-13 13:02:16 -07:00
Emmanuel Garcia
f098de1fde
Enable Proguard by default on release mode (#39986) 2019-09-10 17:22:55 -07:00
Emmanuel Garcia
d230234d67
Revert Maven dependencies (#39747) (39157) (#39784) 2019-09-03 17:49:10 -07:00
Emmanuel Garcia
1b429bdb47
Fix type mismatch in Gradle (#39747) 2019-09-03 11:39:30 -07:00
Emmanuel Garcia
b63cb44105
Use new Maven artifacts from Gradle (#39157) 2019-09-02 10:35:17 -07:00
Emmanuel Garcia
9f39cad4ed
Allow flavors and custom build types in host app (#36805)
Fixes these issues:
#30916
#34089
#36479
#29648
2019-07-29 09:26:41 -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
xster
03220cacd1
Make sure add-to-app build bundle from outer xcodebuild/gradlew sends analytics (#36122) 2019-07-17 11:17:04 -07:00
Josh Burton
577c2fc48c Ensures flutter jar is added to all build types on plugin projects (#34573) 2019-06-25 10:40:55 -07:00
Todd Volkert
bb6c3f8131
Remove flutter_tools support for old AOT snapshotting (#34895)
Android now exclusively uses ELF shared libraries, and
iOS uses assembly.
2019-06-22 19:30:24 -07:00
Emmanuel Garcia
c50fa3d2bd Re-land config lib dependencies for flavors (#34668) 2019-06-18 22:37:42 -07:00
Emmanuel Garcia
9dbc66979a
Revert "Config lib dependencies when using flavors (#34592)" (#34655)
This reverts commit 358b9bd381.
2019-06-18 15:30:59 -07:00
Jason Simmons
c19f78866d
Remove portions of the Gradle script related to dynamic patching (#34606) 2019-06-18 11:11:38 -07:00
Emmanuel Garcia
358b9bd381
Config lib dependencies when using flavors (#34592) 2019-06-17 15:05:16 -07:00
Emmanuel Garcia
09c09bf14b
Add back ability to override the local engine in Gradle (#34460) 2019-06-16 21:52:44 -07:00
Emmanuel Garcia
1c6cda9a0d
Refactor Gradle plugin (#34353) 2019-06-13 16:05:28 -07:00
Emmanuel Garcia
d9c1962973
Instrument usage of include_flutter.groovy and xcode_backend.sh (#34189)
This is done via `flutter build bundle`.   As a consequence, this PR introduces a new way to disable analytics via the `FLUTTER_SUPPRESS_ANALYTICS` env flag.
2019-06-11 14:46:00 -07:00
Emmanuel Garcia
8627ff433b
Allow multi-abi shared libraries in APKs and App bundles (#34123)
* Gradle generates ELF shared libraries instead of AOT snapshots.
* `flutter build apk/appbundle` supports multiple `--target-platform` and defaults to `android-arm` and `android-arm64`.
* `flutter build apk` now has a flag called `--split-per-abi`.
2019-06-10 13:16:09 -07:00
Jonah Williams
f8f7b89976
Revert "Generate ELF shared libraries and allow multi-abi libs in APKs and App bundles (#33696)" (#34121) 2019-06-08 18:43:25 -07:00
Emmanuel Garcia
966b15b4a4
Generate ELF shared libraries and allow multi-abi libs in APKs and App bundles (#33696)
* Gradle generates ELF shared libraries instead of AOT snapshots.
* `flutter build apk/appbundle` supports multiple `--target-platform` and defaults to `android-arm` and `android-arm64`.
*  `flutter build apk` now has a flag called `--split-per-abi`.
2019-06-08 18:02:32 -07:00
Luiz Dubas
841e1cf0af Add mustRunAfter on mergeAssets task to force task ordering (#33272)
Co-authored-by: Miguel Lemos <miguelslemos@gmail.com>
2019-05-28 10:01:19 -07:00
Emmanuel Garcia
dc28ba8919
Remove colon from Gradle task name since it's deprecated (#33191) 2019-05-22 09:58:08 -07:00
Emmanuel Garcia
90f38907d7
Support ARM 32 and 64 bits in app bundles 2019-05-20 13:09:20 -07:00
Todd Volkert
3d09f939ba
Make Gradle error message more specific (#31850) 2019-05-01 10:28:57 -07:00
Jason Simmons
427fcebcc5
Remove the flutter_shared assets directory from the Gradle script (#27572)
flutter_shared was used to package the icudtl.dat file, but that data is
now embedded inside libflutter.so
2019-03-06 11:23:27 -08:00