This is a "How to" guide to setup Versioned ClientLibs for your project.
Step 1 : Introduce ACS commons as dependency / sub package of you project if not already.
Step 2 : Configurations
Please note you may have to restart your AEM server if rewriter configurations do not reflect in sling-rewriter interface or are ineffective (hash code not appending in clienlib urls) right after you copy and modify them under project folder from libs.
Step 2.1 : Configuring logger to prevent warning /info messages from versioned clientlib:
Create an xml named like :
org.apache.sling.commons.log.LogManager.factory.config-versionedClientlibs
under config folder itself (one used to put rewriter configs as per document guide pointed above).
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig"
org.apache.sling.commons.log.file="logs/error.log"
org.apache.sling.commons.log.level="error"
org.apache.sling.commons.log.names="[com.adobe.granite.ui.clientlibs.impl.HtmlLibraryManagerImpl]"
org.apache.sling.commons.log.pattern="\{0,date,yyyy-MM-dd HH:mm:ss.SSS} {4} [{3}] {5}" />