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
a2e5e074
Unverified
Commit
a2e5e074
authored
Aug 20, 2020
by
xster
Committed by
GitHub
Aug 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Android doctor SDK check to 29 and Cirrus images to 30 (#63517)
parent
9e86e9fb
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
34 additions
and
19 deletions
+34
-19
.cirrus.yml
.cirrus.yml
+1
-1
Dockerfile
dev/ci/docker_linux/Dockerfile
+2
-2
android.iml.copy.tmpl
...templates/intellij/dev/manual_tests/android.iml.copy.tmpl
+1
-1
android.iml.copy.tmpl
...s/intellij/examples/flutter_gallery/android.iml.copy.tmpl
+1
-1
android.iml.copy.tmpl
...lates/intellij/examples/hello_world/android.iml.copy.tmpl
+1
-1
android.iml.copy.tmpl
.../intellij/examples/platform_channel/android.iml.copy.tmpl
+1
-1
android.iml.copy.tmpl
...tes/intellij/examples/platform_view/android.iml.copy.tmpl
+1
-1
android.iml.copy.tmpl
..._templates/intellij/examples/stocks/android.iml.copy.tmpl
+1
-1
android_sdk.dart
packages/flutter_tools/lib/src/android/android_sdk.dart
+0
-3
android_workflow.dart
packages/flutter_tools/lib/src/android/android_workflow.dart
+2
-2
create.dart
packages/flutter_tools/lib/src/commands/create.dart
+2
-2
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+18
-0
android_workflow_test.dart
...ols/test/general.shard/android/android_workflow_test.dart
+3
-3
No files found.
.cirrus.yml
View file @
a2e5e074
...
@@ -261,7 +261,7 @@ task:
...
@@ -261,7 +261,7 @@ task:
# WINDOWS SHARDS
# WINDOWS SHARDS
task
:
task
:
windows_container
:
windows_container
:
image
:
cirrusci/android-sdk:
28
-windowsservercore-2019
image
:
cirrusci/android-sdk:
30
-windowsservercore-2019
os_version
:
2019
os_version
:
2019
cpu
:
$CPU
cpu
:
$CPU
memory
:
$MEMORY
memory
:
$MEMORY
...
...
dev/ci/docker_linux/Dockerfile
View file @
a2e5e074
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
# for performing pushes to production, and so this image is quite a bit larger
# for performing pushes to production, and so this image is quite a bit larger
# than strictly needed for just building Flutter apps.
# than strictly needed for just building Flutter apps.
# Last manual update 2020-08-
05
(changing this comment will re-build image)
# Last manual update 2020-08-
11
(changing this comment will re-build image)
# Note: updating past stretch (Debian 9) will bump Java past version 8,
# Note: updating past stretch (Debian 9) will bump Java past version 8,
# which will break the Android SDK.
# which will break the Android SDK.
...
@@ -80,7 +80,7 @@ RUN unzip -q -d "${ANDROID_TOOLS_ROOT}" "${ANDROID_SDK_ARCHIVE}"
...
@@ -80,7 +80,7 @@ RUN unzip -q -d "${ANDROID_TOOLS_ROOT}" "${ANDROID_SDK_ARCHIVE}"
# (it prints install progress WAY too often).
# (it prints install progress WAY too often).
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"tools"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"tools"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"build-tools;28.0.3"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"build-tools;28.0.3"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"platforms;android-
28
"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"platforms;android-
30
"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"platform-tools"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"platform-tools"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"extras;android;m2repository"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"extras;android;m2repository"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"extras;google;m2repository"
>
/dev/null
RUN
yes
"y"
|
"
${
ANDROID_TOOLS_ROOT
}
/tools/bin/sdkmanager"
"extras;google;m2repository"
>
/dev/null
...
...
packages/flutter_tools/ide_templates/intellij/dev/manual_tests/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<content
url=
"file://$MODULE_DIR$/android"
>
<content
url=
"file://$MODULE_DIR$/android"
>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/ide_templates/intellij/examples/flutter_gallery/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<content
url=
"file://$MODULE_DIR$/android"
>
<content
url=
"file://$MODULE_DIR$/android"
>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/ide_templates/intellij/examples/hello_world/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<content
url=
"file://$MODULE_DIR$/android"
>
<content
url=
"file://$MODULE_DIR$/android"
>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/ide_templates/intellij/examples/platform_channel/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<content
url=
"file://$MODULE_DIR$/android"
>
<content
url=
"file://$MODULE_DIR$/android"
>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/ide_templates/intellij/examples/platform_view/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/gen"
isTestSource=
"false"
generated=
"true"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/gen"
isTestSource=
"false"
generated=
"true"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/ide_templates/intellij/examples/stocks/android.iml.copy.tmpl
View file @
a2e5e074
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<content
url=
"file://$MODULE_DIR$/android"
>
<content
url=
"file://$MODULE_DIR$/android"
>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
<sourceFolder
url=
"file://$MODULE_DIR$/android/app/src/main/java"
isTestSource=
"false"
/>
</content>
</content>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
5
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Android API 2
9
Platform"
jdkType=
"Android SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Flutter for Android"
level=
"project"
/>
</component>
</component>
...
...
packages/flutter_tools/lib/src/android/android_sdk.dart
View file @
a2e5e074
...
@@ -22,9 +22,6 @@ const String kAndroidSdkRoot = 'ANDROID_SDK_ROOT';
...
@@ -22,9 +22,6 @@ const String kAndroidSdkRoot = 'ANDROID_SDK_ROOT';
final
RegExp
_numberedAndroidPlatformRe
=
RegExp
(
r'^android-([0-9]+)$'
);
final
RegExp
_numberedAndroidPlatformRe
=
RegExp
(
r'^android-([0-9]+)$'
);
final
RegExp
_sdkVersionRe
=
RegExp
(
r'^ro.build.version.sdk=([0-9]+)$'
);
final
RegExp
_sdkVersionRe
=
RegExp
(
r'^ro.build.version.sdk=([0-9]+)$'
);
/// The minimum Android SDK version we support.
const
int
minimumAndroidSdkVersion
=
25
;
/// Locate ADB. Prefer to use one from an Android SDK, if we can locate that.
/// Locate ADB. Prefer to use one from an Android SDK, if we can locate that.
/// This should be used over accessing androidSdk.adbPath directly because it
/// This should be used over accessing androidSdk.adbPath directly because it
/// will work for those users who have Android Platform Tools installed but
/// will work for those users who have Android Platform Tools installed but
...
...
packages/flutter_tools/lib/src/android/android_workflow.dart
View file @
a2e5e074
...
@@ -25,7 +25,7 @@ import '../globals.dart' as globals;
...
@@ -25,7 +25,7 @@ import '../globals.dart' as globals;
import
'android_sdk.dart'
;
import
'android_sdk.dart'
;
import
'android_studio.dart'
;
import
'android_studio.dart'
;
const
int
kAndroidSdkMinVersion
=
2
8
;
const
int
kAndroidSdkMinVersion
=
2
9
;
final
Version
kAndroidJavaMinVersion
=
Version
(
1
,
8
,
0
);
final
Version
kAndroidJavaMinVersion
=
Version
(
1
,
8
,
0
);
final
Version
kAndroidSdkBuildToolsMinVersion
=
Version
(
28
,
0
,
3
);
final
Version
kAndroidSdkBuildToolsMinVersion
=
Version
(
28
,
0
,
3
);
...
@@ -178,7 +178,7 @@ class AndroidValidator extends DoctorValidator {
...
@@ -178,7 +178,7 @@ class AndroidValidator extends DoctorValidator {
String
sdkVersionText
;
String
sdkVersionText
;
if
(
_androidSdk
.
latestVersion
!=
null
)
{
if
(
_androidSdk
.
latestVersion
!=
null
)
{
if
(
_androidSdk
.
latestVersion
.
sdkLevel
<
28
||
_androidSdk
.
latestVersion
.
buildToolsVersion
<
kAndroidSdkBuildToolsMinVersion
)
{
if
(
_androidSdk
.
latestVersion
.
sdkLevel
<
kAndroidSdkMinVersion
||
_androidSdk
.
latestVersion
.
buildToolsVersion
<
kAndroidSdkBuildToolsMinVersion
)
{
messages
.
add
(
ValidationMessage
.
error
(
messages
.
add
(
ValidationMessage
.
error
(
_userMessages
.
androidSdkBuildToolsOutdated
(
_userMessages
.
androidSdkBuildToolsOutdated
(
_androidSdk
.
sdkManagerPath
,
_androidSdk
.
sdkManagerPath
,
...
...
packages/flutter_tools/lib/src/commands/create.dart
View file @
a2e5e074
...
@@ -9,7 +9,7 @@ import 'package:uuid/uuid.dart';
...
@@ -9,7 +9,7 @@ import 'package:uuid/uuid.dart';
import
'package:yaml/yaml.dart'
;
import
'package:yaml/yaml.dart'
;
import
'../android/android.dart'
as
android_common
;
import
'../android/android.dart'
as
android_common
;
import
'../android/android_
sdk.dart'
as
android_sdk
;
import
'../android/android_
workflow.dart'
;
import
'../android/gradle_utils.dart'
as
gradle
;
import
'../android/gradle_utils.dart'
as
gradle
;
import
'../base/common.dart'
;
import
'../base/common.dart'
;
import
'../base/context.dart'
;
import
'../base/context.dart'
;
...
@@ -764,7 +764,7 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
...
@@ -764,7 +764,7 @@ https://flutter.dev/docs/development/packages-and-plugins/developing-packages#pl
'description'
:
projectDescription
,
'description'
:
projectDescription
,
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'dartSdk'
:
'
$flutterRoot
/bin/cache/dart-sdk'
,
'androidMinApiLevel'
:
android_common
.
minApiLevel
,
'androidMinApiLevel'
:
android_common
.
minApiLevel
,
'androidSdkVersion'
:
android_sdk
.
minimumAndroidSdk
Version
,
'androidSdkVersion'
:
kAndroidSdkMin
Version
,
'withDriverTest'
:
renderDriverTest
,
'withDriverTest'
:
renderDriverTest
,
'pluginClass'
:
pluginClass
,
'pluginClass'
:
pluginClass
,
'pluginClassSnakeCase'
:
pluginClassSnakeCase
,
'pluginClassSnakeCase'
:
pluginClassSnakeCase
,
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
a2e5e074
...
@@ -2007,6 +2007,24 @@ void main() {
...
@@ -2007,6 +2007,24 @@ void main() {
expect
(
env
[
'flutter'
].
allows
(
Version
(
1
,
19
,
0
)),
false
);
expect
(
env
[
'flutter'
].
allows
(
Version
(
1
,
19
,
0
)),
false
);
});
});
testUsingContext
(
'default app uses Android sdk 29'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
when
(
mockFlutterVersion
.
frameworkRevision
).
thenReturn
(
frameworkRevision
);
when
(
mockFlutterVersion
.
channel
).
thenReturn
(
frameworkChannel
);
final
CreateCommand
command
=
CreateCommand
();
final
CommandRunner
<
void
>
runner
=
createTestCommandRunner
(
command
);
await
runner
.
run
(<
String
>[
'create'
,
'--no-pub'
,
projectDir
.
path
]);
expect
(
globals
.
fs
.
isFileSync
(
'
${projectDir.path}
/android/app/build.gradle'
),
true
);
final
String
buildContent
=
await
globals
.
fs
.
file
(
projectDir
.
path
+
'/android/app/build.gradle'
).
readAsString
();
expect
(
buildContent
.
contains
(
'compileSdkVersion 29'
),
true
);
expect
(
buildContent
.
contains
(
'targetSdkVersion 29'
),
true
);
});
}
}
Future
<
void
>
_createProject
(
Future
<
void
>
_createProject
(
...
...
packages/flutter_tools/test/general.shard/android/android_workflow_test.dart
View file @
a2e5e074
...
@@ -219,7 +219,7 @@ void main() {
...
@@ -219,7 +219,7 @@ void main() {
when
(
sdk
.
platformToolsAvailable
).
thenReturn
(
true
);
when
(
sdk
.
platformToolsAvailable
).
thenReturn
(
true
);
// Test with invalid SDK and build tools
// Test with invalid SDK and build tools
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
6
);
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
8
);
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
26
,
0
,
3
));
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
26
,
0
,
3
));
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
when
(
sdk
.
latestVersion
).
thenReturn
(
mockSdkVersion
);
when
(
sdk
.
latestVersion
).
thenReturn
(
mockSdkVersion
);
...
@@ -250,7 +250,7 @@ void main() {
...
@@ -250,7 +250,7 @@ void main() {
);
);
// Test with valid SDK but invalid build tools
// Test with valid SDK but invalid build tools
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
8
);
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
9
);
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
28
,
0
,
2
));
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
28
,
0
,
2
));
validationResult
=
await
androidValidator
.
validate
();
validationResult
=
await
androidValidator
.
validate
();
...
@@ -279,7 +279,7 @@ void main() {
...
@@ -279,7 +279,7 @@ void main() {
// Mock a pass through scenario to reach _checkJavaVersion()
// Mock a pass through scenario to reach _checkJavaVersion()
when
(
sdk
.
licensesAvailable
).
thenReturn
(
true
);
when
(
sdk
.
licensesAvailable
).
thenReturn
(
true
);
when
(
sdk
.
platformToolsAvailable
).
thenReturn
(
true
);
when
(
sdk
.
platformToolsAvailable
).
thenReturn
(
true
);
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
8
);
when
(
mockSdkVersion
.
sdkLevel
).
thenReturn
(
2
9
);
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
28
,
0
,
3
));
when
(
mockSdkVersion
.
buildToolsVersion
).
thenReturn
(
Version
(
28
,
0
,
3
));
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
when
(
sdk
.
sdkManagerPath
).
thenReturn
(
'/foo/bar/sdkmanager'
);
when
(
sdk
.
latestVersion
).
thenReturn
(
mockSdkVersion
);
when
(
sdk
.
latestVersion
).
thenReturn
(
mockSdkVersion
);
...
...
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