• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 or 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 <TARGET>
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### Example 4: Launch IDE with native module
57
58Example to generate and launch CLion project:
59
60```
61$ aidegen <module> -i c
62```
63The native projects will be launched in CLion and you have to select,
64**Tools > CMake > Change Project Root**
65Change project root to the source directory: the relative path which is the directory shown in CLion’s project view. For example, if frameworks/base/media is your project, please change project root directly to frameworks/base/media.
66
67## 3. Optional arguments:
68
69Developers can also use the following optional arguments with AIDEGen commands.
70
71| Option | Long option       | Description                                     |
72| :----: | :---------------- | ----------------------------------------------- |
73| `-d`   | `--depth`         | The depth of module referenced by source.       |
74| `-i`   | `--ide`           | Launch IDE type, j=IntelliJ s=Android Studio e=Eclipse c=CLion v=VS Code|
75| `-p`   | `--ide-path`      | Specify user's IDE installed path.              |
76| `-n`   | `--no_launch`     | Do not launch IDE.                              |
77| `-r`   | `--config-reset`  | Reset all AIDEGen's saved configurations.       |
78| `-s`   | `--skip-build`    | Skip building jars or modules.                  |
79| `-v`   | `--verbose`       | Displays DEBUG level logging.                   |
80| `-a`   | `--android-tree`  | Generate whole Android source tree project file for IDE.|
81| `-e`   | `--exclude-paths` | Exclude the directories in IDE.                 |
82| `-l`   | `--language`      | Launch IDE with a specific language,j=java c=C/C++ r=Rust|
83| `-h`   | `--help`          | Shows help message and exits.                   |
84
85## 4. Troubleshooting tips:
86
87If you get an error like: "Dependent modules dictionary is empty." or other errors, try a make
88clean.
89
90## 5. FAQ:
91
92Q1. If I already have an IDE project file, and I run command AIDEGen to generate
93the same project file again, what'll happen?
94
95A1: The former IDEA project file will be overwritten by the newly generated one
96from the aidegen command.
97
98Q2: When do I need to re-run AIDEGen?
99
100A2: Re-run AIDEGen after repo sync.
101
102## 6. Hint:
103
1041. In IntelliJ, uses [File] > [Invalidate Caches / Restart...] to force
105       project panel updated when your IDE didn't sync.
106
1072. If you run aidegen on a remote desktop, make sure there is no IntelliJ
108       running in a different desktop session.
109
110## 6. Feedback:
111
112If you have any questions or feedback, contact aidegen_tnn@google.com.
113
114If you have any bugs or feature requests email them to buganizer-system+429701@google.com.
115
116
117