README.md
1# AIDEGen
2
3AIDEGen aims to automate the project setup process for developers to work on
4Java or C/C++project in popular IDE environment. Developers no longer need to manually
5configure an IntelliJ project, such as all the project dependencies. It's a
6**command line tool** that offers the following features:
7
8* Configure Android Studio of IntelliJ project files with the relevant module
9 dependencies resolved.
10
11* Launch IDE for a specified sub-project or build target, i.e. frameworks/base
12 or Settings.
13
14* Launch IDE for specified folder(s) which contains build targets, i.e. cts.
15
16* Auto configure JDK and Android coding style for Intellij.
17
18## 1. Prerequisites:
19
20* IDE installation, choose one of prefer IDE, including Android Studio,
21 IntelliJ IDEA, Eclipse, CLion and VS Code.
22
23* Setup Android development environment.
24
25```
26$ source build/envsetup.sh && lunch <TARGE>
27```
28
29## 2. Basic Usage:
30
31### Example 1: Launch IDE with module name
32
33Example to generate and launch IntelliJ project for framework and Settings:
34
35```
36$ aidegen Settings framework
37```
38
39### Example 2: Launch IDE with module path
40
41Example to generate and launch IntelliJ project for framework and Settings:
42
43```
44$ aidegen packages/apps/Settings frameworks/base
45```
46
47### Example 3: Launch IDE with build skipped
48
49Example to generate and launch IntelliJ project for framework and Settings and
50skip build time:
51
52```
53$ aidegen Settings framework -s
54```
55
56## 3. Optional arguments:
57
58Developers can also use the following optional arguments with AIDEGen commands.
59
60| Option | Long option | Description |
61| :----: | :---------------- | ----------------------------------------------- |
62| `-d` | `--depth` | The depth of module referenced by source. |
63| `-i` | `--ide` | Launch IDE type, j=IntelliJ s=Android Studio e=Eclipse c=CLion v=VS Code|
64| `-p` | `--ide-path` | Specify user's IDE installed path. |
65| `-n` | `--no_launch` | Do not launch IDE. |
66| `-r` | `--config-reset` | Reset all AIDEGen's saved configurations. |
67| `-s` | `--skip-build` | Skip building jars or modules. |
68| `-v` | `--verbose` | Displays DEBUG level logging. |
69| `-a` | `--android-tree` | Generate whole Android source tree project file for IDE.|
70| `-e` | `--exclude-paths` | Exclude the directories in IDE. |
71| `-l` | `--language` | Launch IDE with a specific language,j=java c=C/C++ r=Rust|
72| `-h` | `--help` | Shows help message and exits. |
73
74## 4. Troubleshooting tips:
75
76If you get an error like: "Dependent modules dictionary is empty." or other errors, try a make
77clean.
78
79## 5. FAQ:
80
81Q1. If I already have an IDE project file, and I run command AIDEGen to generate
82the same project file again, what'll happen?
83
84A1: The former IDEA project file will be overwritten by the newly generated one
85from the aidegen command.
86
87Q2: When do I need to re-run AIDEGen?
88
89A2: Re-run AIDEGen after repo sync.
90
91## 6. Hint:
92
931. In Intellij, uses [File] > [Invalidate Caches / Restart...] to force
94 project panel updated when your IDE didn't sync.
95
962. If you run aidegen on a remote desktop, make sure there is no IntelliJ
97 running in a different desktop session.
98
99## 6. Feedback:
100
101If you have any questions or feedback, contact aidegen_tnn@google.com.
102
103If you have any bugs or feature requests email them to buganizer-system+429701@google.com.
104
105
106