66.4. repackage实现示例

这是一个典型的repackage示例:

  1. Repackager repackager = new Repackager(sourceJarFile);
  2. repackager.setBackupSource(false);
  3. repackager.repackage(new Libraries() {
  4. @Override
  5. public void doWithLibraries(LibraryCallback callback) throws IOException {
  6. // Build system specific implementation, callback for each dependency
  7. // callback.library(new Library(nestedFile, LibraryScope.COMPILE));
  8. }
  9. });