Embed Dependenices without any plugin in Gradlegradle/embed-dependenciesThe simplest way to embed dependencies in Gradle without any plugin
1jar {
2 // Copy from compileClasspath
3 from {
4 // handling duplicate file strategy
5 duplicatesStrategy = DuplicatesStrategy.WARN
6
7 // copy all files from compileClasspath
8 configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
9 }
10}Disclaimer
The code snippet is provided for reference and learning purposes only. Users should use it at their own risk. I, along with the related developers, shall not be held responsible for any direct or indirect losses caused by the use of this code snippet, including but not limited to data loss, computer malfunctions, program errors, etc.