I need to download a file via URL. I pass in the URL on the gradle command line, use the Gradle download plugin and all is well.
Now I need to do something with that file so I need to extract the last part of the URL as the file name.
The ‘String’ and ‘URI’ classes are not available to me in my gradle script, what is the best way to go about this?
I attempted to import in my script but the types were not available.
I tried passing the base URI and the file name but the download plugin does not accept a reconstructed string as the ‘src’ param (not sure why but it simply throws some sort of exception ).