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
688fb26a
Commit
688fb26a
authored
Jul 21, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a first draft of build_sky_apk.dart
parent
31676299
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
build_sky_apk.dart
packages/flutter_tools/bin/build_sky_apk.dart
+68
-0
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+7
-0
No files found.
packages/flutter_tools/bin/build_sky_apk.dart
0 → 100644
View file @
688fb26a
// Copyright 2015 The Chromium 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
'dart:io'
;
import
'package:args/args.dart'
;
const
String
kBuildToolsVersion
=
'22.0.1'
;
const
String
kAndroidPlatformVersion
=
'22'
;
const
String
kKeystoreKeyName
=
"chromiumdebugkey"
;
const
String
kKeystorePassword
=
"chromium"
;
const
String
kICUDataFile
=
'icudtl.dat'
;
void
run
(
String
command
,
List
<
String
>
args
)
{
ProcessResult
result
=
Process
.
runSync
(
command
,
args
);
stdout
.
write
(
result
.
stdout
);
stderr
.
write
(
result
.
stderr
);
}
main
(
List
<
String
>
argv
)
async
{
ArgParser
parser
=
new
ArgParser
();
parser
.
addFlag
(
'help'
,
abbr:
'h'
,
negatable:
false
);
parser
.
addOption
(
'android-sdk'
);
parser
.
addOption
(
'skyx'
);
ArgResults
args
=
parser
.
parse
(
argv
);
File
unalignedApk
=
new
File
(
'out/Example.apk.unaligned'
);
File
finalApk
=
new
File
(
'out/Example.apk'
);
File
androidManifest
=
new
File
(
'artifacts/AndroidManifest.xml'
);
File
classesDex
=
new
File
(
'artifacts/classes.dex'
);
File
icuDataFile
=
new
File
(
'artifacts/
$kICUDataFile
'
);
File
keystore
=
new
File
(
'artifacts/chromium-debug.keystore'
);
String
androidSDK
=
args
[
'android-sdk'
];
String
buildTools
=
'
$androidSDK
/build-tools/
$kBuildToolsVersion
'
;
String
aapt
=
'
$buildTools
/aapt'
;
String
zipalign
=
'
$buildTools
/zipalign'
;
File
androidJar
=
new
File
(
'
$androidSDK
/platforms/android-
$kAndroidPlatformVersion
/android.jar'
);
String
jarsigner
=
'jarsigner'
;
Directory
assets
=
new
Directory
(
'out/assets'
);
await
assets
.
create
(
recursive:
true
);
icuDataFile
.
copy
(
'
${assets.path}
/
$kICUDataFile
'
);
run
(
aapt
,
[
'package'
,
'-M'
,
androidManifest
.
path
,
'-A'
,
assets
.
path
,
'-I'
,
androidJar
.
path
,
'-F'
,
unalignedApk
.
path
,
]);
run
(
aapt
,
[
'add'
,
'-f'
,
unalignedApk
.
path
,
classesDex
.
path
]);
run
(
jarsigner
,
[
'-keystore'
,
keystore
.
path
,
'-storepass'
,
kKeystorePassword
,
unalignedApk
.
path
,
kKeystoreKeyName
,
]);
run
(
zipalign
,
[
'4'
,
unalignedApk
.
path
,
finalApk
.
path
]);
}
packages/flutter_tools/pubspec.yaml
0 → 100644
View file @
688fb26a
author
:
Chromium Authors <sky-dev@googlegroups.com>
dependencies
:
args
:
'
>=0.13.0
<1.0.0'
description
:
Tools for building Sky applications
homepage
:
https://github.com/domokit/sky_tools
name
:
sky_tools
version
:
0.0.1
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