Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.hazendaz:htmlcompressor:'
}
dependencies {
implementation("com.github.hazendaz:htmlcompressor:")
}
<dependency>
<groupId>com.github.hazendaz</groupId>
<artifactId>htmlcompressor</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.hazendaz" % "htmlcompressor" % ""
:dependencies [[com.github.hazendaz/htmlcompressor ""]]

See site page here
Small, fast and very easy to use Java library that minifies given HTML or XML source by removing extra whitespaces, comments and other unneeded characters without breaking the content structure. As a result pages become smaller in size and load faster. A command-line version of the compressor is also available.
/bin contains main ${project.artifactId}-${project.version}.jar binary, as well as several extra jars (could be useful for IDE integration)/doc javadocs/src sources/lib dependencies (for using with a command line compressor or non-Maven projects)pom.xml Maven POM filejava -jar ${project.artifactId}-${project.version}.jar -h to get a brief description of available parameters.Please refer to http://code.google.com/p/htmlcompressor/ for the detailed documentation.