public static void BootstrapGradle(this ICakeContext context, string version) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (version == null) { throw new ArgumentNullException(nameof(version)); } var versionIdentifier = GradleVersionIdentifier.ForVersion(version); BootstrapGradle(context, versionIdentifier); }
public void Bootstrap_StringVersion_downloads_all_versionInfos() { _fixture.Bootstrap(GradleVersionIdentifier.ForVersion("6.9-rc-2")); _fixture.WebAdapterMock.Verify( x => x.DownloadString(It.Is <Uri>( y => y.ToString().Equals( "https://services.gradle.org/versions/all", StringComparison.OrdinalIgnoreCase))), Times.Once); _fixture.ZipAdapterMock.Verify(x => x.Unzip( It.Is <FilePath>(f => f.GetFilename().ToString() == "gradle-6.9-rc-2-bin.zip"), It.IsAny <DirectoryPath>())); }
internal void Bootstrap(GradleVersionIdentifier versionIdentifier) { _bootstrapper.Bootstrap(versionIdentifier); }
internal async Task <GradleDownloadInformation> GetGradleVersion(string version) { return(await _bootstrapper.GetGradleVersion(GradleVersionIdentifier.ForVersion(version))); }
private static void BootstrapGradle(ICakeContext context, GradleVersionIdentifier version) { new GradleBootstrapper(context.Configuration, context.Environment, context.FileSystem, context.Log) .Bootstrap(version); }