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
b43bd0b1
Commit
b43bd0b1
authored
Jan 25, 2016
by
Matt Perry
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1365 from mpcomplete/apk2
Support local paths to third-party jars in flutter apk.
parents
9862605f
6610b7ea
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+4
-3
apk.dart
packages/flutter_tools/lib/src/commands/apk.dart
+4
-3
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
b43bd0b1
...
@@ -328,9 +328,10 @@ class ArtifactStore {
...
@@ -328,9 +328,10 @@ class ArtifactStore {
File
cachedFile
=
new
File
(
File
cachedFile
=
new
File
(
path
.
join
(
cacheDir
.
path
,
url
.
pathSegments
[
url
.
pathSegments
.
length
-
1
]));
path
.
join
(
cacheDir
.
path
,
url
.
pathSegments
[
url
.
pathSegments
.
length
-
1
]));
if
(!
cachedFile
.
existsSync
())
{
if
(!
cachedFile
.
existsSync
())
{
try
{
await
_downloadFileToCache
(
url
,
cachedFile
);
await
_downloadFileToCache
(
url
,
cachedFile
);
if
(!
cachedFile
.
existsSync
()
)
{
}
catch
(
e
)
{
logging
.
severe
(
'
Unable to fetch third-party artifact:
$url
'
);
logging
.
severe
(
'
Failed to fetch third-party artifact:
$url
:
$e
'
);
throw
new
ProcessExit
(
2
);
throw
new
ProcessExit
(
2
);
}
}
}
}
...
...
packages/flutter_tools/lib/src/commands/apk.dart
View file @
b43bd0b1
...
@@ -194,16 +194,17 @@ class ApkCommand extends FlutterCommand {
...
@@ -194,16 +194,17 @@ class ApkCommand extends FlutterCommand {
continue
;
continue
;
components
.
services
.
addAll
(
serviceConfig
[
'services'
]);
components
.
services
.
addAll
(
serviceConfig
[
'services'
]);
for
(
String
jar
in
serviceConfig
[
'jars'
])
{
for
(
String
jar
in
serviceConfig
[
'jars'
])
{
// Jar might refer to an android SDK jar, or URL to download.
if
(
jar
.
startsWith
(
"android-sdk:"
))
{
if
(
jar
.
startsWith
(
"android-sdk:"
))
{
// Jar is something shipped in the standard android SDK.
jar
=
jar
.
replaceAll
(
'android-sdk:'
,
'
${components.androidSdk.path}
/'
);
jar
=
jar
.
replaceAll
(
'android-sdk:'
,
'
${components.androidSdk.path}
/'
);
components
.
jars
.
add
(
new
File
(
jar
));
components
.
jars
.
add
(
new
File
(
jar
));
}
else
if
(
jar
.
startsWith
(
"http"
))
{
}
else
if
(
jar
.
startsWith
(
"http"
))
{
// Jar is a URL to download.
String
cachePath
=
await
ArtifactStore
.
getThirdPartyFile
(
jar
,
service
);
String
cachePath
=
await
ArtifactStore
.
getThirdPartyFile
(
jar
,
service
);
components
.
jars
.
add
(
new
File
(
cachePath
));
components
.
jars
.
add
(
new
File
(
cachePath
));
}
else
{
}
else
{
logging
.
severe
(
'Service depends on a jar in an unrecognized format:
$jar
'
);
// Assume jar is a path relative to the service's root dir.
throw
new
ProcessExit
(
2
);
components
.
jars
.
add
(
new
File
(
path
.
join
(
serviceRoot
,
jar
))
);
}
}
}
}
}
}
...
...
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