This command generates the configuration files for an IDE to work with the project. This command creates files in-place in the repository, which is unlike other Buck commands whose output is removed by
buck clean. As a result, it is a good idea to add these generated files to the list of ignored files by your choice of source control. IDE-specific details are discussed in each section below.
You can use this command by itself to generate a project for the entire repository.
You can also use this command to build a project slice (a project that represents a subset of the repository). You can pass any number of build targets or build target patterns to the command. The constructed project slice will contain the specified targets and their dependencies. This is useful for large repositories.
buck project //java/...
--ideSpecifies which IDE to create the project for. When using a project slice, Buck tries to determine what type of IDE to use automatically based on the build targets provided. Sometimes it is not possible to determine the type of IDE. You can specify the default ide in the
[project]section of your
--without-testsIndicates that Buck should build a project slice without tests (the default is to include
--without-dependencies-testsIndicates that Buck should build a project slice with the tests of the specified targets only.
--exclude-artifactsDon't include references to the artifacts created by compiling a target in the module representing that target. This can improve indexing times, but will mean generated code does not show up in the ide. For example R files for Android.
--remove-unused-ij-librariesAfter generating an IntelliJ project remove all IntelliJ libraries that are not used in the project.
This command processes all of the build files whose targets were specified and uses them to generate the configuration files for an IDE. The generated files include:
.idea/libraries/*.xml, each of which defines a library in IntelliJ. A library always corresponds to a
.imlfiles, each of which defines a module in IntelliJ. A module can depend on other modules, as well as libraries. It should be noted that although Buck allows multiple build targets per build file, IntelliJ's modules are only defined at the directory level. This means that you may find IntelliJ flagging compilation errors because of missing dependencies of classes outside of your project slice, but which happen to be in the same directory as classes within the slice.
.idea/modules.xml, which lists all of the IntelliJ modules in the project.
- For each build target, an
*.xcworkspacedirectory that represents the workspace and contains one or more schemes.
- For each build target and its dependencies, an
*.xcodeprojdirectory that represents the project. These generated projects are only buildable within the generated workspace.
--combined-projectIndicates that Buck should build a single monoproject for all build targets specified.
--project-schemesEnables the generation of separate schemes for all projects included in the generated workspace. Each project's scheme is constrained to the set of build and test targets that are members or deps of the associated project. You can specify the default value using by adding
project_schemes = trueto the
[project]section of your