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
d97b13b5
Commit
d97b13b5
authored
Jun 26, 2017
by
Sarah Zakarias
Committed by
GitHub
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add objc doc to the dartdoc output (#10905)
parent
f9461718
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
3 deletions
+66
-3
docs.sh
dev/bots/docs.sh
+1
-1
ios.dart
dev/docs/platform_integration/lib/ios.dart
+2
-0
dartdoc.dart
dev/tools/dartdoc.dart
+10
-2
java_and_objc_doc.dart
dev/tools/java_and_objc_doc.dart
+53
-0
No files found.
dev/bots/docs.sh
View file @
d97b13b5
...
...
@@ -14,7 +14,7 @@ bin/cache/dart-sdk/bin/pub global activate dartdoc 0.13.0+1
# a custom index.html, placing everything into dev/docs/doc.
(
cd
dev/tools
;
../../bin/cache/dart-sdk/bin/pub get
)
FLUTTER_ROOT
=
$PWD
bin/cache/dart-sdk/bin/dart dev/tools/dartdoc.dart
FLUTTER_ROOT
=
$PWD
bin/cache/dart-sdk/bin/dart dev/tools/javadoc.dart
FLUTTER_ROOT
=
$PWD
bin/cache/dart-sdk/bin/dart dev/tools/java
_and_objc_
doc.dart
# Ensure google webmaster tools can verify our site.
cp
dev/docs/google2ed1af765c529f57.html dev/docs/doc
...
...
dev/docs/platform_integration/lib/ios.dart
0 → 100644
View file @
d97b13b5
/// [Flutter platform integration APIs for iOS.](https://docs.flutter.io/objcdoc/)
library
iOS
;
dev/tools/dartdoc.dart
View file @
d97b13b5
...
...
@@ -200,6 +200,11 @@ void addHtmlBaseToIndex() {
'href="Android/Android-library.html"'
,
'href="https://docs.flutter.io/javadoc/"'
);
indexContents
=
indexContents
.
replaceAll
(
'href="iOS/iOS-library.html"'
,
'href="https://docs.flutter.io/objc/"'
);
indexFile
.
writeAsStringSync
(
indexContents
);
}
...
...
@@ -243,10 +248,13 @@ Iterable<String> libraryRefs({ bool diskPath: false }) sync* {
}
// Add a fake package for platform integration APIs.
if
(
diskPath
)
if
(
diskPath
)
{
yield
'platform_integration/lib/android.dart'
;
else
yield
'platform_integration/lib/ios.dart'
;
}
else
{
yield
'platform_integration/android.dart'
;
yield
'platform_integration/ios.dart'
;
}
}
void
printStream
(
Stream
<
List
<
int
>>
stream
)
{
...
...
dev/tools/javadoc.dart
→
dev/tools/java
_and_objc_
doc.dart
View file @
d97b13b5
...
...
@@ -10,18 +10,30 @@ import 'package:http/http.dart' as http;
const
String
kDocRoot
=
'dev/docs/doc'
;
/// This script downloads an archive of Javadoc
for the engine from the
///
artifact store and extracts it
to the location used for Dartdoc.
/// This script downloads an archive of Javadoc
and objc doc for the engine from
///
the artifact store and extracts them
to the location used for Dartdoc.
Future
<
Null
>
main
(
List
<
String
>
args
)
async
{
final
String
engineVersion
=
new
File
(
'bin/internal/engine.version'
).
readAsStringSync
().
trim
();
final
String
engineVersion
=
new
File
(
'bin/internal/engine.version'
).
readAsStringSync
().
trim
();
final
String
url
=
'https://storage.googleapis.com/flutter_infra/flutter/
$engineVersion
/android-javadoc.zip'
;
final
String
javadocUrl
=
'https://storage.googleapis.com/flutter_infra/flutter/
$engineVersion
/android-javadoc.zip'
;
generateDocs
(
javadocUrl
,
'javadoc'
,
'io/flutter/view/FlutterView.html'
);
final
String
objcdocUrl
=
'https://storage.googleapis.com/flutter_infra/flutter/
$engineVersion
/ios-objcdoc.zip'
;
generateDocs
(
objcdocUrl
,
'objcdoc'
,
'objc/Classes/FlutterViewController.html'
);
}
Future
<
Null
>
generateDocs
(
final
String
url
,
String
docName
,
String
checkFile
)
async
{
final
http
.
Response
response
=
await
http
.
get
(
url
);
final
Archive
archive
=
new
ZipDecoder
().
decodeBytes
(
response
.
bodyBytes
);
final
Directory
output
=
new
Directory
(
'
$kDocRoot
/
javadoc
'
);
print
(
'Extracing
javadoc
to
${output.path}
'
);
final
Directory
output
=
new
Directory
(
'
$kDocRoot
/
$docName
'
);
print
(
'Extracing
$docName
to
${output.path}
'
);
output
.
createSync
(
recursive:
true
);
for
(
ArchiveFile
af
in
archive
)
{
...
...
@@ -32,10 +44,10 @@ Future<Null> main(List<String> args) async {
}
}
final
File
testFile
=
new
File
(
'
${output.path}
/
io/flutter/view/FlutterView.html
'
);
final
File
testFile
=
new
File
(
'
${output.path}
/
$checkFile
'
);
if
(!
testFile
.
existsSync
())
{
print
(
'Expected file
${testFile.path}
not found'
);
exit
(
1
);
}
print
(
'
Javadocs
ready to go!'
);
print
(
'
$docName
ready to go!'
);
}
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