groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paco Zarate <conta...@nazcasistemas.com>
Subject Re: Gradle Wrapper
Date Thu, 16 Apr 2015 16:41:00 GMT
Maybe using a powershell downloader or requiring cygwin... I don't like any
of them because it increases the dependencies on external elements.

I would say that including the jar for the builder is a preferred solution
and probably would be a good idea to keep a copy of the gradle code that
generates that specific jar.

It's important for a code with this complexity to minimize the barriers for
their contributors and it is evident the value of this jar to get a
reproducible building process in a straight manner.
What do you think?


For powershell I found this code that seems to be simple
http://www.thomasmaurer.ch/2010/10/how-to-download-files-with-powershell/
his snippet is:
(Code starts)
$Url = "http://www.thomasmaurer.ch/ps.txt"
$Path = "C:\temp\ps.txt"
$Username = ""
$Password = ""

$WebClient = New-Object System.Net.WebClient
$WebClient.Credentials = New-Object System.Net.Networkcredential($Username,
$Password)
$WebClient.DownloadFile( $url, $path )
(Code ends)

For calling the powershell from a batch file it is possible to use:
http://blog.danskingdom.com/allow-others-to-run-your-powershell-scripts-from-a-batch-file-they-will-love-you-for-it/

and
http://stackoverflow.com/questions/6359618/pass-parameter-from-batch-file-to-the-powershell-script
to call something like
powershell -NoProfile -ExecutionPolicy Bypass -Command "&
'%PowerShellScriptPath%' 'First Param Value' 'Second Param Value'; exit
$LASTEXITCODE";
the exit code will be available on %errorlevel% in the batch file.




On Thu, Apr 16, 2015 at 9:52 AM, corneil.duplessis@gmail.com <
corneil.duplessis@gmail.com> wrote:

> I had some fun recently.
> I want to try a set of scripts and builds with different versions of Gradle
> and Groovy.
> I used GVM in my script and was happy with the result testing all variety
> of Groovy and Gradle versions.
>
> Then I tried to create do the same on Windows. There is a port of GVM for
> Powershell but it was a real challenge . You couldn't just enter a script
> and be up and running. You had to change permissions to allow it to work
> and start a new shell and then try to get Powershell scripts working that
> uses gvm as expected...
>
> I eventually just used cygwin.
>
> Maybe the simplest is to suggest the Gradle project provides a simple
> download called gradle-wrapper.zip with instructions so that users can
> fetch and unzip the wrapper and be up and running in no time.
>
>
>
> On 16 April 2015 at 17:38, Jochen Theodorou <blackdrag@gmx.org> wrote:
>
> > Am 16.04.2015 17:16, schrieb Roman Shaposhnik:
> > [...]
> >
> >> Like I said -- we did it in Bigtop (UNIX only):
> >>     https://git-wip-us.apache.org/repos/asf?p=bigtop.git;a=blob;
> >> f=gradlew;h=2ad3dae8a6e583ff647b9c05bc02bd7979b88f29;hb=HEAD
> >>
> >> You are welcome to borrow/hack it
> >>
> >
> > So it is valid to require Linux for the source distribution build? And
> > that even if your project does not depend on Linux? The real trouble is
> as
> > always windows.
> >
> >
> > bye blackdrag
> >
> > --
> > Jochen "blackdrag" Theodorou
> > blog: http://blackdragsview.blogspot.com/
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message