Check the Gradle Plugin Portal for instructions on applying the new version to your Git repository.


Although there are numerous bug fixes and enhancements, the main addition in this release is the tasks catalogArchive and catalogUnarchive. This is not to be confused with catalogExport and catalogImport, which are workflow tasks that are used to call other underlying tasks.


We can see the options in these tasks by using the ./gradlew help task.


catalogArchive

==> ./gradlew help --task catalogArchive


> Task :help
Detailed task information for catalogArchive


Path
     :obi:catalogArchive


Type
     CatalogArchiveTask (com.redpillanalytics.obi.gradle.tasks.CatalogArchiveTask)


Options
     --file-path     The path to the archive file.


     --folder     A colon-separated list of catalog folder paths.


     --ignore     When specified, ignore errors returned from APIs or utilities.


     --no-permissions     When specified, permission information is excluded from the archive.


     --no-recursion     When specified, only the immediate contents of the given folders are included in the archive, not the entire subtrees.


     --no-timestamps     When specified, timestamp information is excluded from the archive.


     --offline-mode     When specified, presentation catalog access is in offline mode. NOTE: this requires local server access.


     --rest-api     When specified, use applicable REST APIs instead of CLIs.


     --skip-folder     A colon-separated list of catalog folder paths to exclude.


Description
     Archive the online presentation catalog.


Group
     OBI export


BUILD SUCCESSFUL in 750ms
1 actionable task: 1 executed
==>


catalogUnarchive

==> ./gradlew help --task catalogUnarchive


> Task :help
Detailed task information for catalogUnarchive


Path
     :obi:catalogUnarchive


Type
     CatalogUnarchiveTask (com.redpillanalytics.obi.gradle.tasks.CatalogUnarchiveTask)


Options
     --acl     Catalog permission options. Accepts: inherit (default) | preserve | preserveOnlyGroups | create | createOnlyGroups.


     --delete-first     When specified, delete the folder first before unarchiving.


     --file-path     The path to the archive file.


     --folder     The target catalog folder.


     --ignore     When specified, ignore errors returned from APIs or utilities.


     --offline-mode     When specified, presentation catalog access is in offline mode. NOTE: this requires local server access.


     --overwrite     Catalog overwrite options. Accepts: none (default) | all | old | force | clean.


     --rest-api     When specified, use applicable REST APIs instead of CLIs.


Description
     Unarchive a catalog archive file into the online presentation catalog.


Group
     OBI import


BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
==>


These two tasks together can be used to maintain one or more catalog folders in a target location. To do this, simply wrap the deployment task with catalogArchive and catalogUnarchive:


./gradlew catalogArchive --folder "/shared/sample lite:/shared/components" --file-path build/persist.catalog
./gradlew importWorkflow
./gradlew catalogUnarchive --folder /shared --file-path build/persist.catalog