Here is the code I currently use to add a library at the module level:
final ModifiableRootModel rootModel = ModuleRootManager.getInstance(module).getModifiableModel();
final LibraryTable.ModifiableModel libTable = rootModel.getModuleLibraryTable().getModifiableModel();
Library library = libTable.createLibrary(libName);
final Library.ModifiableModel libraryModel = library.getModifiableModel();
What I would like to do is to group these libraries into a LibraryTable associated with a base library so that if I want to refresh the whole thing and recreate it, I can just delete the base library. Can I do that? If so, how do I do it?