Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d7631275
Unverified
Commit
d7631275
authored
Oct 15, 2021
by
Emmanuel Garcia
Committed by
GitHub
Oct 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump targetSdkVersion to 31 and organize static values (#91719)
parent
ff6f4620
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
198 additions
and
165 deletions
+198
-165
.gitignore
.gitignore
+1
-1
build.gradle
dev/benchmarks/complex_layout/android/app/build.gradle
+3
-3
build.gradle
dev/benchmarks/macrobenchmarks/android/app/build.gradle
+3
-3
build.gradle
dev/benchmarks/microbenchmarks/android/app/build.gradle
+3
-3
build.gradle
...benchmarks/platform_views_layout/android/app/build.gradle
+3
-3
build.gradle
..._views_layout_hybrid_composition/android/app/build.gradle
+3
-3
build.gradle
dev/benchmarks/test_apps/stocks/android/app/build.gradle
+3
-3
build.gradle
...tests/abstract_method_smoke_test/android/app/build.gradle
+2
-2
last-build.bin
...id_custom_host_app/.gradle/6.3/fileChanges/last-build.bin
+0
-0
gc.properties
...n_tests/android_custom_host_app/.gradle/6.3/gc.properties
+0
-0
gc.properties
...tests/android_custom_host_app/.gradle/vcs-1/gc.properties
+0
-0
build.gradle
.../android_embedding_v2_smoke_test/android/app/build.gradle
+2
-2
last-build.bin
...t_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin
+0
-0
gc.properties
...s/android_host_app_v2_embedding/.gradle/6.3/gc.properties
+0
-0
gc.properties
...android_host_app_v2_embedding/.gradle/vcs-1/gc.properties
+0
-0
build.gradle
..._tests/android_semantics_testing/android/app/build.gradle
+3
-3
build.gradle
dev/integration_tests/android_views/android/app/build.gradle
+3
-3
AndroidManifest.xml
...ts/android_views/android/app/src/main/AndroidManifest.xml
+4
-3
build.gradle
dev/integration_tests/channels/android/app/build.gradle
+3
-3
build.gradle
...n_tests/deferred_components_test/android/app/build.gradle
+3
-3
build.gradle
dev/integration_tests/external_ui/android/app/build.gradle
+3
-3
build.gradle
dev/integration_tests/flavors/android/app/build.gradle
+3
-3
build.gradle
...ntegration_tests/flutter_gallery/android/app/build.gradle
+3
-3
build.gradle
...tests/gradle_deprecated_settings/android/app/build.gradle
+2
-2
build.gradle
...ation_tests/hybrid_android_views/android/app/build.gradle
+3
-3
last-build.bin
...build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin
+0
-0
gc.properties
..._with_custom_build_v2_embedding/.gradle/6.3/gc.properties
+0
-0
gc.properties
...ith_custom_build_v2_embedding/.gradle/vcs-1/gc.properties
+0
-0
build.gradle
dev/integration_tests/non_nullable/android/app/build.gradle
+3
-3
build.gradle
...ation_tests/platform_interaction/android/app/build.gradle
+3
-3
build.gradle
...gration_tests/release_smoke_test/android/app/build.gradle
+3
-3
build.gradle
dev/integration_tests/ui/android/app/build.gradle
+3
-3
build.gradle
dev/manual_tests/android/app/build.gradle
+3
-3
build.gradle
examples/api/android/app/build.gradle
+3
-3
build.gradle
examples/flutter_view/android/app/build.gradle
+3
-3
build.gradle
examples/hello_world/android/app/build.gradle
+3
-3
build.gradle
examples/image_list/android/app/build.gradle
+3
-3
build.gradle
examples/layers/android/app/build.gradle
+3
-3
build.gradle
examples/platform_channel/android/app/build.gradle
+3
-3
build.gradle
examples/platform_view/android/app/build.gradle
+3
-3
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+90
-57
build.gradle.tmpl
...plates/app_shared/android-java.tmpl/app/build.gradle.tmpl
+3
-3
build.gradle.tmpl
...ates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
+3
-3
build.gradle.tmpl
...roid/library_new_embedding/Flutter.tmpl/build.gradle.tmpl
+3
-3
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+3
-3
deferred_components_test.dart
...ools/test/integration.shard/deferred_components_test.dart
+1
-2
deferred_components_project.dart
...egration.shard/test_data/deferred_components_project.dart
+3
-3
build.gradle
packages/integration_test/example/android/app/build.gradle
+3
-3
No files found.
.gitignore
View file @
d7631275
...
@@ -61,7 +61,7 @@ unlinked_spec.ds
...
@@ -61,7 +61,7 @@ unlinked_spec.ds
# Android related
# Android related
**/android/**/gradle-wrapper.jar
**/android/**/gradle-wrapper.jar
**/android/.gradle
.gradle/
**/android/captures/
**/android/captures/
**/android/gradlew
**/android/gradlew
**/android/gradlew.bat
**/android/gradlew.bat
...
...
dev/benchmarks/complex_layout/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_11
sourceCompatibility
JavaVersion
.
VERSION_11
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/benchmarks/macrobenchmarks/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"com.example.macrobenchmarks"
applicationId
"com.example.macrobenchmarks"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
dev/benchmarks/microbenchmarks/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/benchmarks/platform_views_layout/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/benchmarks/platform_views_layout_hybrid_composition/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/benchmarks/test_apps/stocks/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.stocks"
applicationId
"io.flutter.examples.stocks"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/abstract_method_smoke_test/android/app/build.gradle
View file @
d7631275
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -49,7 +49,7 @@ android {
...
@@ -49,7 +49,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.abstract_method_smoke_test"
applicationId
"com.example.abstract_method_smoke_test"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/android_custom_host_app/.gradle/6.3/fileChanges/last-build.bin
deleted
100644 → 0
View file @
ff6f4620
File deleted
dev/integration_tests/android_custom_host_app/.gradle/6.3/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/android_custom_host_app/.gradle/vcs-1/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/android_embedding_v2_smoke_test/android/app/build.gradle
View file @
d7631275
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -49,7 +49,7 @@ android {
...
@@ -49,7 +49,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.android_embedding_v2_smoke_test"
applicationId
"com.example.android_embedding_v2_smoke_test"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/fileChanges/last-build.bin
deleted
100644 → 0
View file @
ff6f4620
File deleted
dev/integration_tests/android_host_app_v2_embedding/.gradle/6.3/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/android_host_app_v2_embedding/.gradle/vcs-1/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/android_semantics_testing/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/integration_tests/android_views/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -39,8 +39,8 @@ android {
...
@@ -39,8 +39,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"io.flutter.integration.platformviews"
applicationId
"io.flutter.integration.platformviews"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/android_views/android/app/src/main/AndroidManifest.xml
View file @
d7631275
...
@@ -5,13 +5,14 @@ found in the LICENSE file. -->
...
@@ -5,13 +5,14 @@ found in the LICENSE file. -->
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"io.flutter.integration.platformviews"
>
package=
"io.flutter.integration.platformviews"
>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<application
<application
android:name=
"io.flutter.app.FlutterApplication"
android:name=
"io.flutter.app.FlutterApplication"
android:label=
"platform_views"
>
android:label=
"platform_views"
>
<activity
<activity
android:exported=
"true"
android:name=
".MainActivity"
android:name=
".MainActivity"
android:launchMode=
"singleTop"
android:launchMode=
"singleTop"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
...
@@ -21,8 +22,8 @@ found in the LICENSE file. -->
...
@@ -21,8 +22,8 @@ found in the LICENSE file. -->
android:name=
"io.flutter.app.android.SplashScreenUntilFirstFrame"
android:name=
"io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value=
"true"
/>
android:value=
"true"
/>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<!-- Don't delete the meta-data below.
<!-- Don't delete the meta-data below.
...
...
dev/integration_tests/channels/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/integration_tests/deferred_components_test/android/app/build.gradle
View file @
d7631275
...
@@ -36,7 +36,7 @@ apply plugin: 'kotlin-android'
...
@@ -36,7 +36,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
sourceSets
{
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
main
.
java
.
srcDirs
+=
'src/main/kotlin'
...
@@ -49,8 +49,8 @@ android {
...
@@ -49,8 +49,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"io.flutter.integration.deferred_components_test"
applicationId
"io.flutter.integration.deferred_components_test"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/external_ui/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -28,8 +28,8 @@ android {
...
@@ -28,8 +28,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.externalui"
applicationId
"io.flutter.externalui"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
}
}
...
...
dev/integration_tests/flavors/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -28,8 +28,8 @@ android {
...
@@ -28,8 +28,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"com.yourcompany.flavors"
applicationId
"com.yourcompany.flavors"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
}
}
...
...
dev/integration_tests/flutter_gallery/android/app/build.gradle
View file @
d7631275
...
@@ -40,7 +40,7 @@ apply plugin: 'com.android.application'
...
@@ -40,7 +40,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -49,8 +49,8 @@ android {
...
@@ -49,8 +49,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.demo.gallery"
applicationId
"io.flutter.demo.gallery"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
dev/integration_tests/gradle_deprecated_settings/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -29,7 +29,7 @@ android {
...
@@ -29,7 +29,7 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"com.yourcompany.flavors"
applicationId
"com.yourcompany.flavors"
minSdkVersion
21
minSdkVersion
21
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
}
}
...
...
dev/integration_tests/hybrid_android_views/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -39,8 +39,8 @@ android {
...
@@ -39,8 +39,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"io.flutter.integration.platformviews"
applicationId
"io.flutter.integration.platformviews"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/fileChanges/last-build.bin
deleted
100644 → 0
View file @
ff6f4620
File deleted
dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/6.3/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/module_host_with_custom_build_v2_embedding/.gradle/vcs-1/gc.properties
deleted
100644 → 0
View file @
ff6f4620
dev/integration_tests/non_nullable/android/app/build.gradle
View file @
d7631275
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -48,8 +48,8 @@ android {
...
@@ -48,8 +48,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.non_nullable"
applicationId
"com.example.non_nullable"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
dev/integration_tests/platform_interaction/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"0.0.1"
versionName
"0.0.1"
}
}
...
...
dev/integration_tests/release_smoke_test/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -39,8 +39,8 @@ android {
...
@@ -39,8 +39,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.release_smoke_test"
applicationId
"com.example.release_smoke_test"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
dev/integration_tests/ui/android/app/build.gradle
View file @
d7631275
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
...
@@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -27,8 +27,8 @@ android {
...
@@ -27,8 +27,8 @@ android {
}
}
defaultConfig
{
defaultConfig
{
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
1
versionCode
1
versionName
"1.0"
versionName
"1.0"
}
}
...
...
dev/manual_tests/android/app/build.gradle
View file @
d7631275
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -52,8 +52,8 @@ android {
...
@@ -52,8 +52,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.manual_tests"
applicationId
"com.example.manual_tests"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/api/android/app/build.gradle
View file @
d7631275
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
...
@@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -48,8 +48,8 @@ android {
...
@@ -48,8 +48,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"dev.flutter.flutter_api_samples"
applicationId
"dev.flutter.flutter_api_samples"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/flutter_view/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.flutter_view"
applicationId
"io.flutter.examples.flutter_view"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/hello_world/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.hello_world"
applicationId
"io.flutter.examples.hello_world"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/image_list/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -39,8 +39,8 @@ android {
...
@@ -39,8 +39,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.image_list"
applicationId
"com.example.image_list"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/layers/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.layers"
applicationId
"io.flutter.examples.layers"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
examples/platform_channel/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.platform_channel"
applicationId
"io.flutter.examples.platform_channel"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
examples/platform_view/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
defaultConfig
{
defaultConfig
{
applicationId
"io.flutter.examples.platform_view"
applicationId
"io.flutter.examples.platform_view"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
}
}
...
...
packages/flutter_tools/gradle/flutter.gradle
View file @
d7631275
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
static
groovy
.
io
.
FileType
.
FILES
import
static
groovy
.
io
.
FileType
.
FILES
import
com.android.builder.model.AndroidProject
import
com.android.builder.model.AndroidProject
...
@@ -23,6 +27,27 @@ import org.gradle.api.tasks.bundling.Jar
...
@@ -23,6 +27,27 @@ import org.gradle.api.tasks.bundling.Jar
import
org.gradle.internal.os.OperatingSystem
import
org.gradle.internal.os.OperatingSystem
import
org.gradle.util.VersionNumber
import
org.gradle.util.VersionNumber
/** For apps only. Provides the flutter extension used in app/build.gradle. */
class
FlutterExtension
{
/** Sets the compileSdkVersion used by default in Flutter app projects. */
static
int
compileSdkVersion
=
30
/** Sets the minSdkVersion used by default in Flutter app projects. */
static
int
minSdkVersion
=
16
/** Sets the targetSdkVersion used by default in Flutter app projects. */
static
int
targetSdkVersion
=
31
/**
* Specifies the relative directory to the Flutter project directory.
* In an app project, this is ../.. since the app's build.gradle is under android/app.
*/
String
source
/** Allows to override the target file. Otherwise, the target is lib/main.dart. */
String
target
}
buildscript
{
buildscript
{
repositories
{
repositories
{
google
()
google
()
...
@@ -33,10 +58,15 @@ buildscript {
...
@@ -33,10 +58,15 @@ buildscript {
}
}
}
}
/**
* Some apps don't set default compile options.
* Apps can change these values in android/app/build.gradle.
* This just ensures that default values are set.
*/
android
{
android
{
compileOptions
{
compileOptions
{
sourceCompatibility
1.
8
sourceCompatibility
JavaVersion
.
VERSION_1_
8
targetCompatibility
1.
8
targetCompatibility
JavaVersion
.
VERSION_1_
8
}
}
}
}
...
@@ -45,19 +75,19 @@ apply plugin: FlutterPlugin
...
@@ -45,19 +75,19 @@ apply plugin: FlutterPlugin
class
FlutterPlugin
implements
Plugin
<
Project
>
{
class
FlutterPlugin
implements
Plugin
<
Project
>
{
private
static
final
String
DEFAULT_MAVEN_HOST
=
"https://storage.googleapis.com"
;
private
static
final
String
DEFAULT_MAVEN_HOST
=
"https://storage.googleapis.com"
;
/
/ The platforms that can be passed to the `--Ptarget-platform` flag.
/
** The platforms that can be passed to the `--Ptarget-platform` flag. */
private
static
final
String
PLATFORM_ARM32
=
"android-arm"
;
private
static
final
String
PLATFORM_ARM32
=
"android-arm"
;
private
static
final
String
PLATFORM_ARM64
=
"android-arm64"
;
private
static
final
String
PLATFORM_ARM64
=
"android-arm64"
;
private
static
final
String
PLATFORM_X86
=
"android-x86"
;
private
static
final
String
PLATFORM_X86
=
"android-x86"
;
private
static
final
String
PLATFORM_X86_64
=
"android-x64"
;
private
static
final
String
PLATFORM_X86_64
=
"android-x64"
;
/
/ The ABI architectures.
/
** The ABI architectures supported by Flutter. */
private
static
final
String
ARCH_ARM32
=
"armeabi-v7a"
;
private
static
final
String
ARCH_ARM32
=
"armeabi-v7a"
;
private
static
final
String
ARCH_ARM64
=
"arm64-v8a"
;
private
static
final
String
ARCH_ARM64
=
"arm64-v8a"
;
private
static
final
String
ARCH_X86
=
"x86"
;
private
static
final
String
ARCH_X86
=
"x86"
;
private
static
final
String
ARCH_X86_64
=
"x86_64"
;
private
static
final
String
ARCH_X86_64
=
"x86_64"
;
/
/ Maps platforms to ABI architectures.
/
** Maps platforms to ABI architectures. */
private
static
final
Map
PLATFORM_ARCH_MAP
=
[
private
static
final
Map
PLATFORM_ARCH_MAP
=
[
(
PLATFORM_ARM32
)
:
ARCH_ARM32
,
(
PLATFORM_ARM32
)
:
ARCH_ARM32
,
(
PLATFORM_ARM64
)
:
ARCH_ARM64
,
(
PLATFORM_ARM64
)
:
ARCH_ARM64
,
...
@@ -65,9 +95,11 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -65,9 +95,11 @@ class FlutterPlugin implements Plugin<Project> {
(
PLATFORM_X86_64
)
:
ARCH_X86_64
,
(
PLATFORM_X86_64
)
:
ARCH_X86_64
,
]
]
// The version code that gives each ABI a value.
/**
// For each APK variant, use the following versions to override the version of the Universal APK.
* The version code that gives each ABI a value.
// Otherwise, the Play Store will complain that the APK variants have the same version.
* For each APK variant, use the following versions to override the version of the Universal APK.
* Otherwise, the Play Store will complain that the APK variants have the same version.
*/
private
static
final
Map
ABI_VERSION
=
[
private
static
final
Map
ABI_VERSION
=
[
(
ARCH_ARM32
)
:
1
,
(
ARCH_ARM32
)
:
1
,
(
ARCH_ARM64
)
:
2
,
(
ARCH_ARM64
)
:
2
,
...
@@ -75,18 +107,20 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -75,18 +107,20 @@ class FlutterPlugin implements Plugin<Project> {
(
ARCH_X86_64
)
:
4
,
(
ARCH_X86_64
)
:
4
,
]
]
/
/ When split is enabled, multiple APKs are generated per each ABI.
/
** When split is enabled, multiple APKs are generated per each ABI. */
private
static
final
List
DEFAULT_PLATFORMS
=
[
private
static
final
List
DEFAULT_PLATFORMS
=
[
PLATFORM_ARM32
,
PLATFORM_ARM32
,
PLATFORM_ARM64
,
PLATFORM_ARM64
,
PLATFORM_X86_64
,
PLATFORM_X86_64
,
]
]
// The name prefix for flutter builds. This is used to identify gradle tasks
/**
// where we expect the flutter tool to provide any error output, and skip the
* The name prefix for flutter builds. This is used to identify gradle tasks
// standard Gradle error output in the FlutterEventLogger. If you change this,
* where we expect the flutter tool to provide any error output, and skip the
// be sure to change any instances of this string in symbols in the code below
* standard Gradle error output in the FlutterEventLogger. If you change this,
// to match.
* be sure to change any instances of this string in symbols in the code below
* to match.
*/
static
final
String
FLUTTER_BUILD_PREFIX
=
"flutterBuild"
static
final
String
FLUTTER_BUILD_PREFIX
=
"flutterBuild"
private
Project
project
private
Project
project
...
@@ -293,7 +327,7 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -293,7 +327,7 @@ class FlutterPlugin implements Plugin<Project> {
getPluginDependencies
().
each
this
.&
configurePluginDependencies
getPluginDependencies
().
each
this
.&
configurePluginDependencies
}
}
/
/ Adds the plugin project dependency to the app project .
/
** Adds the plugin project dependency to the app project. */
private
void
configurePluginProject
(
String
pluginName
,
String
_
)
{
private
void
configurePluginProject
(
String
pluginName
,
String
_
)
{
Project
pluginProject
=
project
.
rootProject
.
findProject
(
":$pluginName"
)
Project
pluginProject
=
project
.
rootProject
.
findProject
(
":$pluginName"
)
if
(
pluginProject
==
null
)
{
if
(
pluginProject
==
null
)
{
...
@@ -337,19 +371,19 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -337,19 +371,19 @@ class FlutterPlugin implements Plugin<Project> {
}
}
}
}
// Returns `true` if the given path contains an `android/build.gradle` file.
/**
//
* Returns `true` if the given path contains an `android/build.gradle` file.
// TODO(egarciad): Fix https://github.com/flutter/flutter/issues/39657.
*/
// Android Studio may create empty android directories due to the logic in <app>/android/settings.gradle,
// which imports all plugins regardless of whether they support the android platform.
private
Boolean
doesSupportAndroidPlatform
(
String
path
)
{
private
Boolean
doesSupportAndroidPlatform
(
String
path
)
{
File
editableAndroidProject
=
new
File
(
path
,
'android'
+
File
.
separator
+
'build.gradle'
)
File
editableAndroidProject
=
new
File
(
path
,
'android'
+
File
.
separator
+
'build.gradle'
)
return
editableAndroidProject
.
exists
()
return
editableAndroidProject
.
exists
()
}
}
// Add the dependencies on other plugin projects to the plugin project.
/**
// A plugin A can depend on plugin B. As a result, this dependency must be surfaced by
* Add the dependencies on other plugin projects to the plugin project.
// making the Gradle plugin project A depend on the Gradle plugin project B.
* A plugin A can depend on plugin B. As a result, this dependency must be surfaced by
* making the Gradle plugin project A depend on the Gradle plugin project B.
*/
private
void
configurePluginDependencies
(
Object
dependencyObject
)
{
private
void
configurePluginDependencies
(
Object
dependencyObject
)
{
assert
dependencyObject
.
name
instanceof
String
assert
dependencyObject
.
name
instanceof
String
Project
pluginProject
=
project
.
rootProject
.
findProject
(
":${dependencyObject.name}"
)
Project
pluginProject
=
project
.
rootProject
.
findProject
(
":${dependencyObject.name}"
)
...
@@ -392,7 +426,7 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -392,7 +426,7 @@ class FlutterPlugin implements Plugin<Project> {
return
androidPlugins
return
androidPlugins
}
}
/
/ Gets the plugins dependencies from `.flutter-plugins-dependencies`.
/
** Gets the plugins dependencies from `.flutter-plugins-dependencies`. */
private
List
getPluginDependencies
()
{
private
List
getPluginDependencies
()
{
// Consider a `.flutter-plugins-dependencies` file with the following content:
// Consider a `.flutter-plugins-dependencies` file with the following content:
// {
// {
...
@@ -487,7 +521,7 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -487,7 +521,7 @@ class FlutterPlugin implements Plugin<Project> {
return
false
return
false
}
}
/
// Whether to build the debug app in "fast-start" mode.
/
** Whether to build the debug app in "fast-start" mode. */
private
Boolean
isFastStart
()
{
private
Boolean
isFastStart
()
{
if
(
project
.
hasProperty
(
"fast-start"
))
{
if
(
project
.
hasProperty
(
"fast-start"
))
{
return
project
.
property
(
"fast-start"
).
toBoolean
()
return
project
.
property
(
"fast-start"
).
toBoolean
()
...
@@ -501,9 +535,11 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -501,9 +535,11 @@ class FlutterPlugin implements Plugin<Project> {
return
project
.
plugins
.
hasPlugin
(
"com.android.application"
);
return
project
.
plugins
.
hasPlugin
(
"com.android.application"
);
}
}
// Returns true if the build mode is supported by the current call to Gradle.
/**
// This only relevant when using a local engine. Because the engine
* Returns true if the build mode is supported by the current call to Gradle.
// is built for a specific mode, the call to Gradle must match that mode.
* This only relevant when using a local engine. Because the engine
* is built for a specific mode, the call to Gradle must match that mode.
*/
private
Boolean
supportsBuildMode
(
String
flutterBuildMode
)
{
private
Boolean
supportsBuildMode
(
String
flutterBuildMode
)
{
if
(!
useLocalEngine
())
{
if
(!
useLocalEngine
())
{
return
true
;
return
true
;
...
@@ -588,30 +624,32 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -588,30 +624,32 @@ class FlutterPlugin implements Plugin<Project> {
return
target
return
target
}
}
// In AGP 4.0, the Android linter task depends on the JAR tasks that generate `libapp.so`.
/**
// When building APKs, this causes an issue where building release requires the debug JAR,
* In AGP 4.0, the Android linter task depends on the JAR tasks that generate `libapp.so`.
// but Gradle won't build debug.
* When building APKs, this causes an issue where building release requires the debug JAR,
//
* but Gradle won't build debug.
// To workaround this issue, only configure the JAR task that is required given the task
*
// from the command line.
* To workaround this issue, only configure the JAR task that is required given the task
//
* from the command line.
// The AGP team said that this issue is fixed in Gradle 7.0, which isn't released at the
*
// time of adding this code. Once released, this can be removed.
* The AGP team said that this issue is fixed in Gradle 7.0, which isn't released at the
//
* time of adding this code. Once released, this can be removed.
// Tested cases:
*
// * `./gradlew assembleRelease`
* Tested cases:
// * `./gradlew app:assembleRelease.`
* * `./gradlew assembleRelease`
// * `./gradlew assemble{flavorName}Release`
* * `./gradlew app:assembleRelease.`
// * `./gradlew app:assemble{flavorName}Release`
* * `./gradlew assemble{flavorName}Release`
// * `./gradlew assemble.`
* * `./gradlew app:assemble{flavorName}Release`
// * `./gradlew app:assemble.`
* * `./gradlew assemble.`
// * `./gradlew bundle.`
* * `./gradlew app:assemble.`
// * `./gradlew bundleRelease.`
* * `./gradlew bundle.`
// * `./gradlew app:bundleRelease.`
* * `./gradlew bundleRelease.`
//
* * `./gradlew app:bundleRelease.`
// Related issues:
*
// https://issuetracker.google.com/issues/158060799
* Related issues:
// https://issuetracker.google.com/issues/158753935
* https://issuetracker.google.com/issues/158060799
* https://issuetracker.google.com/issues/158753935
*/
private
boolean
shouldConfigureFlutterTask
(
Task
assembleTask
)
{
private
boolean
shouldConfigureFlutterTask
(
Task
assembleTask
)
{
def
cliTasksNames
=
project
.
gradle
.
startParameter
.
taskNames
def
cliTasksNames
=
project
.
gradle
.
startParameter
.
taskNames
if
(
cliTasksNames
.
size
()
!=
1
||
!
cliTasksNames
.
first
().
contains
(
"assemble"
))
{
if
(
cliTasksNames
.
size
()
!=
1
||
!
cliTasksNames
.
first
().
contains
(
"assemble"
))
{
...
@@ -917,11 +955,6 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -917,11 +955,6 @@ class FlutterPlugin implements Plugin<Project> {
}
}
}
}
class
FlutterExtension
{
String
source
String
target
}
abstract
class
BaseFlutterTask
extends
DefaultTask
{
abstract
class
BaseFlutterTask
extends
DefaultTask
{
@Internal
@Internal
File
flutterRoot
File
flutterRoot
...
...
packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl
View file @
d7631275
...
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
...
@@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
android {
compileSdkVersion
30
compileSdkVersion
flutter.compileSdkVersion
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
...
@@ -35,8 +35,8 @@ android {
...
@@ -35,8 +35,8 @@ android {
defaultConfig {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{androidIdentifier}}"
applicationId "{{androidIdentifier}}"
minSdkVersion
16
minSdkVersion
flutter.minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionName flutterVersionName
}
}
...
...
packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
View file @
d7631275
...
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
...
@@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
android {
compileSdkVersion
30
compileSdkVersion
flutter.compileSdkVersion
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
...
@@ -44,8 +44,8 @@ android {
...
@@ -44,8 +44,8 @@ android {
defaultConfig {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{androidIdentifier}}"
applicationId "{{androidIdentifier}}"
minSdkVersion
16
minSdkVersion
flutter.minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionName flutterVersionName
}
}
...
...
packages/flutter_tools/templates/module/android/library_new_embedding/Flutter.tmpl/build.gradle.tmpl
View file @
d7631275
...
@@ -30,7 +30,7 @@ group '{{androidIdentifier}}'
...
@@ -30,7 +30,7 @@ group '{{androidIdentifier}}'
version '1.0'
version '1.0'
android {
android {
compileSdkVersion
30
compileSdkVersion
flutter.compileSdkVersion
compileOptions {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
...
@@ -38,8 +38,8 @@ android {
...
@@ -38,8 +38,8 @@ android {
}
}
defaultConfig {
defaultConfig {
minSdkVersion
16
minSdkVersion
flutter.minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionName flutterVersionName
}
}
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
d7631275
...
@@ -2368,7 +2368,7 @@ void main() {
...
@@ -2368,7 +2368,7 @@ void main() {
expect
(
env
[
'flutter'
].
allows
(
Version
(
2
,
4
,
9
)),
false
);
expect
(
env
[
'flutter'
].
allows
(
Version
(
2
,
4
,
9
)),
false
);
});
});
testUsingContext
(
'default app uses
Android SDK 30
'
,
()
async
{
testUsingContext
(
'default app uses
flutter default versions
'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
Cache
.
flutterRoot
=
'../..'
;
final
CreateCommand
command
=
CreateCommand
();
final
CreateCommand
command
=
CreateCommand
();
...
@@ -2380,8 +2380,8 @@ void main() {
...
@@ -2380,8 +2380,8 @@ void main() {
final
String
buildContent
=
await
globals
.
fs
.
file
(
'
${projectDir.path}
/android/app/build.gradle'
).
readAsString
();
final
String
buildContent
=
await
globals
.
fs
.
file
(
'
${projectDir.path}
/android/app/build.gradle'
).
readAsString
();
expect
(
buildContent
.
contains
(
'compileSdkVersion
30
'
),
true
);
expect
(
buildContent
.
contains
(
'compileSdkVersion
flutter.compileSdkVersion
'
),
true
);
expect
(
buildContent
.
contains
(
'targetSdkVersion
30
'
),
true
);
expect
(
buildContent
.
contains
(
'targetSdkVersion
flutter.targetSdkVersion
'
),
true
);
});
});
testUsingContext
(
'Linux plugins handle partially camel-case project names correctly'
,
()
async
{
testUsingContext
(
'Linux plugins handle partially camel-case project names correctly'
,
()
async
{
...
...
packages/flutter_tools/test/integration.shard/deferred_components_test.dart
View file @
d7631275
...
@@ -40,6 +40,7 @@ void main() {
...
@@ -40,6 +40,7 @@ void main() {
'--target-platform=android-arm64'
'--target-platform=android-arm64'
],
workingDirectory:
tempDir
.
path
);
],
workingDirectory:
tempDir
.
path
);
expect
(
result
.
exitCode
,
0
);
expect
(
result
.
stdout
.
toString
(),
contains
(
'app-release.aab'
));
expect
(
result
.
stdout
.
toString
(),
contains
(
'app-release.aab'
));
expect
(
result
.
stdout
.
toString
(),
contains
(
'Deferred components prebuild validation passed.'
));
expect
(
result
.
stdout
.
toString
(),
contains
(
'Deferred components prebuild validation passed.'
));
expect
(
result
.
stdout
.
toString
(),
contains
(
'Deferred components gen_snapshot validation passed.'
));
expect
(
result
.
stdout
.
toString
(),
contains
(
'Deferred components gen_snapshot validation passed.'
));
...
@@ -60,8 +61,6 @@ void main() {
...
@@ -60,8 +61,6 @@ void main() {
expect
(
archive
.
findFile
(
'component1/assets/flutter_assets/test_assets/asset2.txt'
)
!=
null
,
true
);
expect
(
archive
.
findFile
(
'component1/assets/flutter_assets/test_assets/asset2.txt'
)
!=
null
,
true
);
expect
(
archive
.
findFile
(
'base/assets/flutter_assets/test_assets/asset1.txt'
)
!=
null
,
true
);
expect
(
archive
.
findFile
(
'base/assets/flutter_assets/test_assets/asset1.txt'
)
!=
null
,
true
);
expect
(
result
.
exitCode
,
0
);
});
});
testWithoutContext
(
'simple build appbundle all targets succeeds'
,
()
async
{
testWithoutContext
(
'simple build appbundle all targets succeeds'
,
()
async
{
...
...
packages/flutter_tools/test/integration.shard/test_data/deferred_components_project.dart
View file @
d7631275
...
@@ -177,7 +177,7 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
...
@@ -177,7 +177,7 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
apply from: "
$flutterRoot
/packages/flutter_tools/gradle/flutter.gradle"
apply from: "
$flutterRoot
/packages/flutter_tools/gradle/flutter.gradle"
android {
android {
compileSdkVersion
30
compileSdkVersion
flutter.compileSdkVersion
sourceSets {
sourceSets {
main.java.srcDirs += '
src
/
main
/
kotlin
'
main.java.srcDirs += '
src
/
main
/
kotlin
'
...
@@ -190,8 +190,8 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
...
@@ -190,8 +190,8 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
defaultConfig {
defaultConfig {
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "ninja.qian.splitaottest1"
applicationId "ninja.qian.splitaottest1"
minSdkVersion
16
minSdkVersion
flutter.minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
versionName flutterVersionName
}
}
...
...
packages/integration_test/example/android/app/build.gradle
View file @
d7631275
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
...
@@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
android
{
compileSdkVersion
30
compileSdkVersion
flutter
.
compileSdkVersion
compileOptions
{
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
@@ -39,8 +39,8 @@ android {
...
@@ -39,8 +39,8 @@ android {
defaultConfig
{
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.example.integration_test_example"
applicationId
"com.example.integration_test_example"
minSdkVersion
16
minSdkVersion
flutter
.
minSdkVersion
targetSdkVersion
30
targetSdkVersion
flutter
.
targetSdkVersion
versionCode
flutterVersionCode
.
toInteger
()
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
versionName
flutterVersionName
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment