Open alireza19330 opened 6 years ago
I found a good way here: https://stackoverflow.com/a/40230421/826008 I think it's a good idea to merge this piece of code to the MinifyJS plugin
That is not a good way at all, considering that:
Task.execute
, and Gradle 5 even removes it. (And this plugin hasn't been updated since late 2017.)It would be better to be able to tell what I want to minify and how using a closure mapper, for example...
Edit (2019-10-24): Also consider an incremental task (for fine-grained up-to-date checks) + the Worker API (for parallel execution). They aren't really difficult if you follow the official user guides.
Have there been any progress on this? Would it also be possible to obfuscate them separately? I have separate roots in my project. It is functional to merge the files, but it is not optimal since the file gets bigger again with code that is never going to be used.
I saw this from @eriwen: https://stackoverflow.com/a/34187137 Have this been implemented yet, or do I still need to create a local version? I will experiment with this later.
@ChrisAcrobat Did you get this to work? I can't seem to get this working, even by following the exact steps.
@eriwen Any chance to add this function "officially" to the plugin?
Yes. I think I needed to do some changes to make it work for my project, but yes. I think it was remove ".min" and put in a directory instead.
I want to minify multiple JS files in a directory without combining them together. for example I have these files in my directory: first.js, second.js, third.js .... and I want to have the minified version of them on the same directory and the same files. Sorry, I'm not too familiar with Gradle and groovy syntax.
Is there any way to do so? I want to do something like that:
Right now I handled that by defining several Gradle task for each minifying!