Added a "subConfigurations" field and implemented proper configuration selection for dependencies.