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
c8538873
Unverified
Commit
c8538873
authored
Mar 09, 2022
by
Tacca
Committed by
GitHub
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
95533 min sdk error msgs enhancements (#99550)
parent
9240c9a0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
5 deletions
+20
-5
README.md
packages/flutter_tools/README.md
+1
-1
flutter.gradle
packages/flutter_tools/gradle/flutter.gradle
+8
-0
gradle_errors.dart
packages/flutter_tools/lib/src/android/gradle_errors.dart
+5
-4
build.gradle.tmpl
...plates/app_shared/android-java.tmpl/app/build.gradle.tmpl
+2
-0
build.gradle.tmpl
...ates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
+2
-0
gradle_errors_test.dart
..._tools/test/general.shard/android/gradle_errors_test.dart
+2
-0
No files found.
packages/flutter_tools/README.md
View file @
c8538873
...
@@ -97,7 +97,7 @@ variable to be set. The full invocation to run everything might
...
@@ -97,7 +97,7 @@ variable to be set. The full invocation to run everything might
therefore look something like:
therefore look something like:
```
shell
```
shell
$ FLUTTER_ROOT
=
~/path/to/flutter-sdk
$
export
FLUTTER_ROOT
=
~/path/to/flutter-sdk
$
flutter
test
--concurrency
1
$
flutter
test
--concurrency
1
```
```
...
...
packages/flutter_tools/gradle/flutter.gradle
View file @
c8538873
...
@@ -139,6 +139,11 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -139,6 +139,11 @@ class FlutterPlugin implements Plugin<Project> {
private
Properties
localProperties
private
Properties
localProperties
private
String
engineVersion
private
String
engineVersion
/**
* Flutter Docs Website URLs for help messages.
*/
private
final
String
kWebsiteDeploymentAndroidBuildConfig
=
'https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration'
@Override
@Override
void
apply
(
Project
project
)
{
void
apply
(
Project
project
)
{
this
.
project
=
project
this
.
project
=
project
...
@@ -409,9 +414,12 @@ class FlutterPlugin implements Plugin<Project> {
...
@@ -409,9 +414,12 @@ class FlutterPlugin implements Plugin<Project> {
// Wait until the Android plugin loaded.
// Wait until the Android plugin loaded.
pluginProject
.
afterEvaluate
{
pluginProject
.
afterEvaluate
{
// Checks if there is a mismatch between the plugin compileSdkVersion and the project compileSdkVersion.
if
(
pluginProject
.
android
.
compileSdkVersion
>
project
.
android
.
compileSdkVersion
)
{
if
(
pluginProject
.
android
.
compileSdkVersion
>
project
.
android
.
compileSdkVersion
)
{
project
.
logger
.
quiet
(
"Warning: The plugin ${pluginName} requires Android SDK version ${pluginProject.android.compileSdkVersion.substring(8)}."
)
project
.
logger
.
quiet
(
"Warning: The plugin ${pluginName} requires Android SDK version ${pluginProject.android.compileSdkVersion.substring(8)}."
)
project
.
logger
.
quiet
(
"For more information about build configuration, see $kWebsiteDeploymentAndroidBuildConfig."
)
}
}
project
.
android
.
buildTypes
.
all
addEmbeddingDependencyToPlugin
project
.
android
.
buildTypes
.
all
addEmbeddingDependencyToPlugin
}
}
}
}
...
...
packages/flutter_tools/lib/src/android/gradle_errors.dart
View file @
c8538873
...
@@ -410,7 +410,8 @@ final GradleHandledError minSdkVersion = GradleHandledError(
...
@@ -410,7 +410,8 @@ final GradleHandledError minSdkVersion = GradleHandledError(
'The plugin
${minSdkVersionMatch?.group(3)}
requires a higher Android SDK version.
\n
'
'The plugin
${minSdkVersionMatch?.group(3)}
requires a higher Android SDK version.
\n
'
'
$textInBold
\n
'
'
$textInBold
\n
'
"Note that your app won't be available to users running Android SDKs below
${minSdkVersionMatch?.group(2)}
.
\n
"
"Note that your app won't be available to users running Android SDKs below
${minSdkVersionMatch?.group(2)}
.
\n
"
'Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.'
,
'Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
\n
'
'For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration'
,
title:
_boxTitle
,
title:
_boxTitle
,
);
);
return
GradleBuildStatus
.
exit
;
return
GradleBuildStatus
.
exit
;
...
@@ -518,8 +519,8 @@ final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
...
@@ -518,8 +519,8 @@ final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
required
bool
usesAndroidX
,
required
bool
usesAndroidX
,
required
bool
multidexEnabled
,
required
bool
multidexEnabled
,
})
async
{
})
async
{
final
Match
?
minSdkVersionMatch
=
_minCompileSdkVersionPattern
.
firstMatch
(
line
);
final
Match
?
min
Compile
SdkVersionMatch
=
_minCompileSdkVersionPattern
.
firstMatch
(
line
);
assert
(
minSdkVersionMatch
?.
groupCount
==
1
);
assert
(
min
Compile
SdkVersionMatch
?.
groupCount
==
1
);
final
File
gradleFile
=
project
.
directory
final
File
gradleFile
=
project
.
directory
.
childDirectory
(
'android'
)
.
childDirectory
(
'android'
)
...
@@ -529,7 +530,7 @@ final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
...
@@ -529,7 +530,7 @@ final GradleHandledError minCompileSdkVersionHandler = GradleHandledError(
'
${globals.logger.terminal.warningMark}
Your project requires a higher compileSdkVersion.
\n
'
'
${globals.logger.terminal.warningMark}
Your project requires a higher compileSdkVersion.
\n
'
'Fix this issue by bumping the compileSdkVersion in
${gradleFile.path}
:
\n
'
'Fix this issue by bumping the compileSdkVersion in
${gradleFile.path}
:
\n
'
'android {
\n
'
'android {
\n
'
' compileSdkVersion
${minSdkVersionMatch?.group(1)}
\n
'
' compileSdkVersion
${min
Compile
SdkVersionMatch?.group(1)}
\n
'
'}'
,
'}'
,
title:
_boxTitle
,
title:
_boxTitle
,
);
);
...
...
packages/flutter_tools/templates/app_shared/android-java.tmpl/app/build.gradle.tmpl
View file @
c8538873
...
@@ -37,6 +37,8 @@ android {
...
@@ -37,6 +37,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}}"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
...
...
packages/flutter_tools/templates/app_shared/android-kotlin.tmpl/app/build.gradle.tmpl
View file @
c8538873
...
@@ -45,6 +45,8 @@ android {
...
@@ -45,6 +45,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}}"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
minSdkVersion flutter.minSdkVersion
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionCode flutterVersionCode.toInteger()
...
...
packages/flutter_tools/test/general.shard/android/gradle_errors_test.dart
View file @
c8538873
...
@@ -780,6 +780,8 @@ assembleProfile
...
@@ -780,6 +780,8 @@ assembleProfile
"│ Note that your app won't be available to users running Android SDKs below 19. │
\n
"
"│ Note that your app won't be available to users running Android SDKs below 19. │
\n
"
'│ Alternatively, try to find a version of this plugin that supports these lower versions of the │
\n
'
'│ Alternatively, try to find a version of this plugin that supports these lower versions of the │
\n
'
'│ Android SDK. │
\n
'
'│ Android SDK. │
\n
'
'│ For more information, see: │
\n
'
'│ https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration │
\n
'
'└───────────────────────────────────────────────────────────────────────────────────────────────┘
\n
'
'└───────────────────────────────────────────────────────────────────────────────────────────────┘
\n
'
)
)
);
);
...
...
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