This is liable to change in the future.A
project_config()rule is used to specify the information needed to generate the configuration files for an IDE so the primary build target (and optionally its tests) of a BUCK file can be built using that IDE.
Note that there may only be one
project_config() rule per BUCK file.
A build rule that will serve as the basis of the generated project. Currently, it must be one of:
android_binary(). The generated IDE project will be of a type that corresponds to the type of the rule.
depsof this rule will determine the other IDE projects on which the IDE project for this rule depends. Note that this is a heuristic, but it appears to work reasonably well, in practice.
The root directories of the source code that correspond to
src_target. Values may include:
NoneThere are no source roots. This could happen if
src_targetidentifies an Android library project that is purely resources and no Java code.
The directory that contains the build file is a Java package. In this case, the root of the package must be one of the ancestor directories. Buck can deduce where the root of the package is by using the
src_rootsproperty in the
[java]section of the
srcdirectory under the build file directory is a source root. This list may contain multiple elements, but in practice, it should almost always contain at most one element. This option supports a list to allow generated source code to be checked in alongside the hand-written source of imported projects. In this case,
If specified, a complementary tests project for
src_target. In IntelliJ, source and test code can be grouped together in the same module while having different classpaths. In Eclipse, source and test code are often in separate projects because they need to have different classpaths.
src_roots, but for
List of build target patterns that identify the build rules that can include this rule in its
project_config( src_target = ':lib-base', src_roots = [ 'src' ], test_target = ':tests', test_roots = ['tests'], )