Rather than determining if the library is static or shared based on
the contents of the directory, make the property part of the metadata.
The static property defaults to false.
This is being added to support IDEs that use Prefab as a medium to
communicate dependencies between modules. Android Studio wants to do
this because it allows AGP externalNativeBuild modules to depend on
each other, even if they are using different build systems.
The v1 schema cannot support this use case because it requires that
the libraries are already in the package. Since Android Studio needs
to run the build's configure phase for every module before running
the build for any module, the libraries may not be built yet.
By necessity this patch also includes all the infrastructure for
handling schema migrations. The test packages were duplicated into a
v1 and v2 directory to ensure that both cases are tested. All the v2
test packages have had their placeholder libraries removed, which
means every v2 package tests the behavior of the new feature.
Rather than determining if the library is static or shared based on the contents of the directory, make the property part of the metadata. The
static
property defaults to false.This is being added to support IDEs that use Prefab as a medium to communicate dependencies between modules. Android Studio wants to do this because it allows AGP externalNativeBuild modules to depend on each other, even if they are using different build systems.
The v1 schema cannot support this use case because it requires that the libraries are already in the package. Since Android Studio needs to run the build's configure phase for every module before running the build for any module, the libraries may not be built yet.
By necessity this patch also includes all the infrastructure for handling schema migrations. The test packages were duplicated into a v1 and v2 directory to ensure that both cases are tested. All the v2 test packages have had their placeholder libraries removed, which means every v2 package tests the behavior of the new feature.