Gradle isn’t the first tool I normally think of when doing Javascript projects, if only because there are tools out there much more suited like NPM.
Now, if you are trying to get libraries like bootstrap for a java web project, you could look into WebJars, which are Jar’ed versions of javascript libraries that you can then link to inside Java-based templating systems like Thymeleaf and JSP. From what I’ve seen, using webjars seems to be a preferred approach to including web dependencies in a java-based web project.