Advertisement
Guest User

Dependency Classpath

a guest
May 8th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Groovy 0.45 KB | None | 0 0
  1. String buildClasspath(String... excluded) {
  2.     return project.configurations.compile.resolve().stream().filter { file ->
  3.         String fileName = file.getName()
  4.         if(!fileName.endsWith(".jar")) return false
  5.  
  6.         for(String e : excluded) {
  7.             if(fileName.startsWith(e)) {
  8.                 return false
  9.             }
  10.         }
  11.  
  12.         return true
  13.     }.map { file -> file.getName() }.collect(Collectors.joining("", "\t", "\n"))
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement