-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[AGP 9] Migrate plugins to support AGP 9 #11802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c35e039
20f78c1
d65cb14
59a180d
00d5cc3
71aff96
457bfab
fbf1622
e2971c8
c41615f
553f8bc
18e4079
6e2239d
8df47bb
8f06407
873ca07
1ab4090
59507fd
4e197fb
6de1f59
ec62754
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| org.gradle.jvmargs=-Xmx4G | ||
| android.useAndroidX=true | ||
|
|
||
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| import android.content.ClipData; | ||
| import android.content.Intent; | ||
| import android.net.Uri; | ||
| import android.os.Build; | ||
| import android.view.View; | ||
| import androidx.test.core.app.ActivityScenario; | ||
| import androidx.test.espresso.flutter.api.WidgetAssertion; | ||
|
|
@@ -39,14 +40,21 @@ public class FileSelectorAndroidTest { | |
| @Rule public IntentsRule intentsRule = new IntentsRule(); | ||
|
|
||
| public void clearAnySystemDialog() { | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { | ||
| return; | ||
| } | ||
| myActivityTestRule | ||
| .getScenario() | ||
| .onActivity( | ||
| new ActivityScenario.ActivityAction<DriverExtensionActivity>() { | ||
| @Override | ||
| public void perform(DriverExtensionActivity activity) { | ||
| Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); | ||
| activity.sendBroadcast(closeDialog); | ||
| try { | ||
| Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS); | ||
| activity.sendBroadcast(closeDialog); | ||
| } catch (SecurityException e) { | ||
| // Suppress exception on S+ emulator devices. | ||
| } | ||
|
Comment on lines
+52
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
activity.sendBroadcast(closeDialog); |
||
| } | ||
| }); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| org.gradle.jvmargs=-Xmx4G | ||
| android.useAndroidX=true | ||
|
|
||
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| org.gradle.jvmargs=-Xmx4G | ||
| android.useAndroidX=true | ||
|
|
||
| # This builtInKotlin flag was added automatically by Flutter migrator | ||
| android.builtInKotlin=false | ||
| # This newDsl flag was added automatically by Flutter migrator | ||
| android.newDsl=false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR explicitly migrates the plugins and their example apps to use the new Gradle plugins DSL and built-in Kotlin (by removing
id("kotlin-android")and updating the Gradle/Kotlin versions), these flags should be set totrue.If
android.builtInKotlinis left asfalse, the Flutter Gradle plugin will not automatically apply Kotlin, and sincekotlin-androidwas removed, Kotlin compilation will fail. Similarly,android.newDslshould betruesince the project has been migrated to the new declarative plugins DSL insettings.gradle.kts.Note: Please apply this change to all other
gradle.propertiesfiles modified in this PR.