40 Commits

Author SHA1 Message Date
Emmanuel Garcia ee032f67c7 flutter build aar should also build plugins as AARs (#43994) 2019-11-02 09:46:25 -07:00
Emmanuel Garcia ade8dfac3d Move the plugin registrant to io.flutter.plugins and add the @Keep annotation (#44011) 2019-11-01 16:58:26 -07:00
Taufiq Rahman 35adf72c7f Add smallestScreenSize to android:configChanges in the Android manifest template (#43245) 2019-10-22 20:46:18 -07:00
Emmanuel Garcia 08c645b3b2 Test the Android embedding v2 (#42708)
* Test the Android embedding v2

* Update integration tests

* Split into shards
2019-10-16 21:26:10 -07:00
Emmanuel Garcia 5961bcc505 Generate projects using the new Android embedding (#41666)
* Generate projects using the new Android embedding

* Add comment about usesNewEmbedding:true

* Feedback

* Rework way to detect new embedding in new apps
2019-10-04 06:23:03 -07:00
Emmanuel Garcia 8a1bf5b827 Reland #39157 (#39798) 2019-09-17 08:19:33 -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 d230234d67 Revert Maven dependencies (#39747) (39157) (#39784) 2019-09-03 17:49:10 -07:00
Emmanuel Garcia b63cb44105 Use new Maven artifacts from Gradle (#39157) 2019-09-02 10:35:17 -07:00
Emmanuel Garcia c08a3c7a0a Add metadata to indicate if the host app contains a Flutter module (#37731) 2019-08-06 22:38:09 -07:00
stevemessick 93dd90fc1a Add .android/Flutter/flutter.iml to module template. (#37405) 2019-08-01 15:47:00 -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
Josh Burton d0e45a2369 Adds support for generating projects that use AndroidX support libraries (#31028) 2019-05-31 18:33:02 -07:00
Emmanuel Garcia 12a0e475e2 Make paths absolute in settings.gradle (#33228) 2019-05-23 23:32:11 -07:00
KyleWong 7c19ec6ca8 Add2App: Fix crash resulted from hard-code module 'app' based resource copy. (#27154) 2019-01-30 10:29:29 -08:00
Jonah Williams f777db2b78 add uiMode to android:configChanges (#26896) 2019-01-22 10:37:22 -08:00
Dan Field d8d36bc7e8 targetSdkVersion 28 (#26798) 2019-01-19 11:59:42 -08:00
Jason Simmons cf4c903144 Update compileSdkVersion in the Android app templates to Android P (#26444)
Fixes https://github.com/flutter/flutter/issues/25703
2019-01-14 16:16:12 -08:00
kongshanshan33 305ab1a35b Fix project directory has spaces lead to compile error when use 'flutter create -t module'command (#23817) 2019-01-09 11:18:40 -08:00
Dan Field 1407091bfb Fix red tree (Android module) (#26270) 2019-01-08 20:40:19 -08:00
Stanislav Baranov 323d1574c6 newly created apps / plugins should use latest gradle dependencies (#22790) (#23314) 2018-10-19 19:07:06 -07:00
Yegor 82d6589590 Revert "newly created apps / plugins should use latest gradle dependencies (#22790)" (#23263)
This reverts commit 751c083f7d.

Our buildbots need to be upgraded to a newer version of the Android SDK.
2018-10-18 14:17:47 -07:00