Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 0bab1f6

Browse files
committed
bug reporting, choose version, and many more
1 parent 4fd2b64 commit 0bab1f6

6 files changed

Lines changed: 437 additions & 200 deletions

File tree

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@ Please remember the [system requirements](https://flutter.dev/docs/get-started/i
1010

1111
Download **[here](https://github.com/daffaalam/flutter_installer_cli/releases/latest)** and run right away.
1212

13+
By default it will take the latest flutter version from the stable channel. If you want to use another version, use the `channel` and` version` flags. Use the version name from https://flutter.dev/docs/development/tools/sdk/releases.
14+
15+
For example to get the latest beta channel:
16+
```
17+
flutter_installer_cli --channel beta
18+
```
19+
You can also choose the version:
20+
```
21+
flutter_installer_cli --version v1.12.13+hotfix.9
22+
```
23+
You can also combine the two:
24+
```
25+
flutter_installer_cli --channel beta --version v1.14.6
26+
```
27+
28+
If the version and channel do not find a match, it will retrieve the latest this channel version (by default it is a stable channel).
29+
1330
## Screenshots
1431

1532
![screenshot](screenshots/screenshot.png)
@@ -20,17 +37,16 @@ Download **[here](https://github.com/daffaalam/flutter_installer_cli/releases/la
2037
- [x] Detects whether Android SDK, Java SDK and Flutter SDK are installed.
2138
- [x] Check the latest versions of Android SDK, Java SDK, and Flutter SDK.
2239
- [x] Install Android SDK, Java SDK, and Flutter SDK.
23-
- [x] Install Flutter and Dart plugin for Visual Studio Code.
40+
- [x] Install Flutter and Dart plugin for Visual Studio Code and Android Studio.
41+
- [x] Choose the previous flutter version.
2442

2543
## TODO
2644

2745
- [ ] low - Language improvement (I'm very bad at English).
2846
- [ ] high - Implementation to Linux and MacOS.
2947
- [ ] low - Pretty and simple code.
30-
- [ ] high - Send error logs automatically for analysis (sentry.io).
3148
- [ ] high - Implementation to the GUI (flutter) version.
3249
- [ ] high - Can choose a custom installation path.
33-
- [ ] high - Can choose the previous flutter version.
3450

3551
## Running the tests
3652

@@ -49,7 +65,7 @@ Download **[here](https://github.com/daffaalam/flutter_installer_cli/releases/la
4965

5066
## Contributing
5167

52-
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository ([me](mailto:daffaalam@gmail.com)) before making a change.
68+
When contributing to this repository, please first discuss the change you wish to make via [issue](https://github.com/daffaalam/flutter_installer_cli/issues), [email](mailto:daffaalam@gmail.com), or [any other method](https://s.id/bio-daffa) with the owners of this repository before making a change.
5369

5470
## License
5571

bin/flutter_installer_cli.dart

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ import 'package:process_run/which.dart';
66

77
import 'tools/function.dart';
88

9-
void main() async {
9+
void main(List<String> args) async {
1010
try {
11-
isDebug = false; // TODO : for testing only (show all verbose)
1211
environment.addAll(Platform.environment);
1312

13+
parseArgs(args);
14+
15+
await run('chcp 437 > nul', []);
16+
1417
var powerShell = await checkPowerShell();
1518
if (!powerShell && Platform.isWindows) {
1619
stdout.writeln(
@@ -42,7 +45,7 @@ void main() async {
4245
if (!exists) await Directory(installationPath).create(recursive: true);
4346
var studio = await checkAndroidStudio();
4447
var later = false;
45-
if (!studio) {
48+
if (studio == null) {
4649
later = await promptConfirm(
4750
'Android Studio is not installed. Do you want to install the full package (Flutter without Android Studio)?',
4851
);
@@ -65,8 +68,13 @@ void main() async {
6568
await installFlutter(
6669
operatingSystem: operatingSystem,
6770
);
71+
if (studio != null) {
72+
await androidStudioInstallExtensions(
73+
studio: studio,
74+
);
75+
}
6876
if (vscodePath != null) {
69-
await vscodeInstallExtension();
77+
await vscodeInstallExtensions();
7078
}
7179
if (gitPath == null) {
7280
await stdout.writeln(
@@ -93,7 +101,7 @@ void main() async {
93101
showText(' FINISH ');
94102
stdin.readLineSync();
95103
exit(0);
96-
} catch (e) {
97-
await errorLog(e);
104+
} catch (e, s) {
105+
await errorLog(e, s);
98106
}
99107
}

bin/model/android_studio.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import 'package:meta/meta.dart';
2+
3+
class AndroidStudio {
4+
String home;
5+
String config;
6+
7+
AndroidStudio({
8+
@required this.home,
9+
@required this.config,
10+
});
11+
}

0 commit comments

Comments
 (0)