forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Script for running javadoc on the Flutter Android libraries (flutter#…
- Loading branch information
1 parent
2466d31
commit cdf4638
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2017 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 argparse | ||
import os | ||
import subprocess | ||
import sys | ||
|
||
ANDROID_SRC_ROOT = 'flutter/shell/platform/android' | ||
|
||
|
||
def main(): | ||
if not os.path.exists(ANDROID_SRC_ROOT): | ||
print 'This script must be run at the root of the Flutter source tree' | ||
return 1 | ||
|
||
parser = argparse.ArgumentParser(description='Runs javadoc on Flutter Android libraries') | ||
parser.add_argument('--out-dir', type=str, required=True) | ||
args = parser.parse_args() | ||
|
||
if not os.path.exists(args.out_dir): | ||
os.makedirs(args.out_dir) | ||
|
||
classpath = [ | ||
ANDROID_SRC_ROOT, | ||
'third_party/android_tools/sdk/platforms/android-22/android.jar', | ||
'base/android/java/src', | ||
'third_party/jsr-305/src/ri/src/main/java', | ||
] | ||
packages = [ | ||
'io.flutter.app', | ||
'io.flutter.view', | ||
'io.flutter.plugin.editing', | ||
'io.flutter.plugin.common', | ||
'io.flutter.plugin.platform', | ||
] | ||
|
||
return subprocess.call([ | ||
'javadoc', | ||
'-classpath', ':'.join(classpath), | ||
'-d', args.out_dir, | ||
] + packages) | ||
|
||
|
||
if __name__ == '__main__': | ||
sys.exit(main()) |