| 165 | |
| 166 | |
| 167 | def parse_args(): |
| 168 | root = Path(__file__).resolve().parents[1] |
| 169 | parser = argparse.ArgumentParser(description='Build BrainFlow Android AAR.') |
| 170 | parser.add_argument('--android-sdk-root', type=Path) |
| 171 | parser.add_argument('--android-api-level', default=os.environ.get( |
| 172 | 'ANDROID_API_LEVEL', DEFAULT_ANDROID_API_LEVEL)) |
| 173 | parser.add_argument('--min-sdk', default='31') |
| 174 | parser.add_argument('--output', type=Path, default=root / 'tools' / 'brainflow-android.aar') |
| 175 | parser.add_argument('--allow-missing-abis', action='store_true') |
| 176 | parser.add_argument('--build-native', action='store_true', |
| 177 | help='Build native Android libraries before packaging.') |
| 178 | parser.add_argument('--abis', nargs='+', choices=ANDROID_ABIS, default=list(ANDROID_ABIS)) |
| 179 | parser.add_argument('--native-build-root', type=Path, default=root / 'build_android_aar') |
| 180 | parser.add_argument('--ndk-root', type=Path) |
| 181 | parser.add_argument('--jobs', type=int, default=2) |
| 182 | parser.add_argument('--use-libftdi', action='store_true') |
| 183 | parser.add_argument('--cmake-find-root-path') |
| 184 | parser.add_argument('--cmake-define', action='append', default=[], |
| 185 | help='Extra CMake definition without leading -D, for example FOO=ON.') |
| 186 | return parser.parse_args() |
| 187 | |
| 188 | |
| 189 | def main(): |