AIDEGen

AIDEGen aims to automate the project setup process for developers to work on Java or C/C++project in popular IDE environment. Developers no longer need to manually configure an IntelliJ project, such as all the project dependencies. It's a command line tool that offers the following features:

  • Configure Android Studio of IntelliJ project files with the relevant module dependencies resolved.

  • Launch IDE for a specified sub-project or build target, i.e. frameworks/base or Settings.

  • Launch IDE for specified folder(s) which contains build targets, i.e. cts.

  • Auto configure JDK and Android coding style for Intellij.

1. Prerequisites:

  • IDE installation, choose one of prefer IDE, including Android Studio, IntelliJ IDEA, Eclipse, CLion and VS Code.

  • Setup Android development environment.

$ source build/envsetup.sh && lunch <TARGE>

2. Basic Usage:

Example 1: Launch IDE with module name

Example to generate and launch IntelliJ project for framework and Settings:

$ aidegen Settings framework

Example 2: Launch IDE with module path

Example to generate and launch IntelliJ project for framework and Settings:

$ aidegen packages/apps/Settings frameworks/base

Example 3: Launch IDE with sikpping build time

Example to generate and launch IntelliJ project for framework and Settings and skip build time:

$ aidegen Settings framework -s

3. Optional arguments:

Developers can also use the following optional arguments with AIDEGen commands.

OptionLong optionDescription
-d--depthThe depth of module referenced by source.
-i--ideLaunch IDE type, j=IntelliJ s=Android Studio e=Eclipse c=CLion v=VS Code
-p--ide-pathSpecify user's IDE installed path.
-n--no_launchDo not launch IDE.
-r--config-resetReset all AIDEGen's saved configurations.
-s--skip-buildSkip building jars or modules.
-v--verboseDisplays DEBUG level logging.
-a--android-treeGenerate whole Android source tree project file for IDE.
-e--exclude-pathsExclude the directories in IDE.
-l--languageLaunch IDE with a specific language,j=java c=C/C++ r=Rust
-h--helpShows help message and exits.

4. FAQ:

Q1. If I already have an IDE project file, and I run command AIDEGen to generate the same project file again, what'll happen?

A1: The former IDEA project file will be overwritten by the newly generated one from the aidegen command.

Q2: When do I need to re-run AIDEGen?

A2: Re-run AIDEGen after repo sync.

5. Hint:

  1. In Intellij, uses [File] > [Invalidate Caches / Restart...] to force project panel updated when your IDE didn't sync.

  2. If you run aidegen on a remote desktop, make sure there is no IntelliJ running in a different desktop session.