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
68a3aa70
Commit
68a3aa70
authored
Mar 21, 2016
by
Chinmay Garde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the artifacts store for iOS assets
parent
c8377d74
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
27 deletions
+18
-27
engine.version
bin/cache/engine.version
+1
-1
update_engine.sh
bin/cache/update_engine.sh
+1
-0
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+7
-0
setup_xcodeproj.dart
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
+9
-26
No files found.
bin/cache/engine.version
View file @
68a3aa70
646500663e7db5deaab2d0a8a96ace2b29d0da27
c358ddc8f81dc1a59d01bd50420c5fc979c28f19
bin/cache/update_engine.sh
View file @
68a3aa70
...
...
@@ -61,6 +61,7 @@ if [ ! -f "$ENGINE_STAMP_PATH" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP_P
Darwin
)
download_artifacts darwin-x64
chmod
a+x
"
$ENGINE_ARTIFACT_PATH
/darwin-x64/sky_snapshot"
download_artifacts ios
;;
Linux
)
download_artifacts linux-x64
...
...
packages/flutter_tools/lib/src/artifacts.dart
View file @
68a3aa70
...
...
@@ -42,6 +42,7 @@ enum ArtifactType {
androidIcuData
,
androidKeystore
,
androidLibSkyShell
,
iosXcodeProject
,
}
class
Artifact
{
...
...
@@ -125,6 +126,12 @@ class ArtifactStore {
type:
ArtifactType
.
androidLibSkyShell
,
targetPlatform:
TargetPlatform
.
android_arm
),
const
Artifact
.
_
(
name:
'iOS Runner (Xcode Project)'
,
fileName:
'FlutterXcode.zip'
,
type:
ArtifactType
.
iosXcodeProject
,
targetPlatform:
TargetPlatform
.
ios
),
];
static
Artifact
getArtifact
({
...
...
packages/flutter_tools/lib/src/ios/setup_xcodeproj.dart
View file @
68a3aa70
...
...
@@ -8,35 +8,11 @@ import 'dart:io';
import
'package:path/path.dart'
as
path
;
import
'../artifacts.dart'
;
import
'../build_configuration.dart'
;
import
'../base/process.dart'
;
import
'../globals.dart'
;
import
'../runner/flutter_command_runner.dart'
;
Uri
_xcodeProjectUri
(
String
revision
)
{
String
uriString
=
'https://storage.googleapis.com/flutter_infra/flutter/
$revision
/ios/FlutterXcode.zip'
;
return
Uri
.
parse
(
uriString
);
}
Future
<
List
<
int
>>
_fetchXcodeArchive
()
async
{
printStatus
(
'Fetching the Xcode project archive from the cloud...'
);
HttpClient
client
=
new
HttpClient
();
Uri
xcodeProjectUri
=
_xcodeProjectUri
(
ArtifactStore
.
engineRevision
);
printStatus
(
'Downloading
$xcodeProjectUri
...'
);
HttpClientRequest
request
=
await
client
.
getUrl
(
xcodeProjectUri
);
HttpClientResponse
response
=
await
request
.
close
();
if
(
response
.
statusCode
!=
200
)
throw
new
Exception
(
response
.
reasonPhrase
);
BytesBuilder
bytesBuilder
=
new
BytesBuilder
(
copy:
false
);
await
for
(
List
<
int
>
chunk
in
response
)
bytesBuilder
.
add
(
chunk
);
return
bytesBuilder
.
takeBytes
();
}
Future
<
bool
>
_inflateXcodeArchive
(
String
directory
,
List
<
int
>
archiveBytes
)
async
{
printStatus
(
'Unzipping Xcode project to local directory...'
);
...
...
@@ -117,7 +93,14 @@ Future<int> setupXcodeProjectHarness(String flutterProjectPath) async {
// Step 1: Fetch the archive from the cloud
String
iosFilesPath
=
path
.
join
(
flutterProjectPath
,
'ios'
);
String
xcodeprojPath
=
path
.
join
(
iosFilesPath
,
'.generated'
);
List
<
int
>
archiveBytes
=
await
_fetchXcodeArchive
();
Artifact
xcodeProject
=
ArtifactStore
.
getArtifact
(
type:
ArtifactType
.
iosXcodeProject
,
targetPlatform:
TargetPlatform
.
ios
);
String
xcodeProjectPath
=
await
ArtifactStore
.
getPath
(
xcodeProject
);
List
<
int
>
archiveBytes
=
await
new
File
(
xcodeProjectPath
).
readAsBytes
();
if
(
archiveBytes
.
isEmpty
)
{
printError
(
'Error: No archive bytes received.'
);
...
...
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