public virtual bool Initialize(BuildToolLogger buildToolLogger)
        {
            if (!_androidBuildTools.Initialize(buildToolLogger) || !_androidSdkPlatform.Initialize(buildToolLogger))
            {
                return(false);
            }

            var newestBuildToolsVersion = _androidBuildTools.GetNewestBuildToolsVersion();

            if (newestBuildToolsVersion == null)
            {
                buildToolLogger.DisplayErrorDialog(string.Format("Failed to locate {0}", BuildToolsDisplayName));
                return(false);
            }

            if (AndroidBuildTools.IsBuildToolsVersionAtLeast(newestBuildToolsVersion, BuildToolsMinimumVersion))
            {
                return(true);
            }

            var message =
                string.Format(
                    "This build requires {0} version {1} or later.", BuildToolsDisplayName, BuildToolsMinimumVersion);

            buildToolLogger.DisplayErrorDialog(message);
            return(false);
        }
        public virtual bool Initialize(BuildToolLogger buildToolLogger)
        {
            if (!_androidBuildTools.Initialize(buildToolLogger) || !_androidSdkPlatform.Initialize(buildToolLogger))
            {
                return(false);
            }

            var newestBuildToolsVersion = _androidBuildTools.GetNewestBuildToolsVersion();

            if (newestBuildToolsVersion == null)
            {
                buildToolLogger.DisplayErrorDialog(string.Format("Failed to locate {0}", BuildToolsDisplayName));
                return(false);
            }

            if (AndroidBuildTools.IsBuildToolsVersionAtLeast(newestBuildToolsVersion, BuildToolsMinimumVersion))
            {
                return(true);
            }

            var message = string.Format(
                "App Bundle creation requires {0} version {1} or later.\n\nClick \"OK\" to install {0} version {2}.",
                BuildToolsDisplayName, BuildToolsMinimumVersion, BuildToolsLatestVersion);

            if (buildToolLogger.DisplayActionableErrorDialog(message))
            {
                AndroidSdkPackageInstaller.InstallPackage(BuildToolsPackageName, BuildToolsDisplayName);
            }

            return(false);
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 public AndroidAssetPackagingTool(AndroidBuildTools androidBuildTools, AndroidSdkPlatform androidSdkPlatform)
 {
     _androidBuildTools  = androidBuildTools;
     _androidSdkPlatform = androidSdkPlatform;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public ApkSigner(AndroidBuildTools androidBuildTools, JavaUtils javaUtils)
 {
     _androidBuildTools = androidBuildTools;
     _javaUtils         = javaUtils;
 }