/// <summary>
    /// 此方法是从Jenkins上接收数据并且开始打包的方法
    /// 使用该方法默认不需要使用ModifyVersionFromJenkins
    /// 修改gradle的运行时变量
    /// </summary>
    static void BuildFromJenkins()
    {
        Console.WriteLine("Clean Gradle");
        //先clean gradle
//        CleanAndroidProject();
        Console.WriteLine("BuildFromJenkins start");
        //获取目标包的target
        string PublishUnityProject = GetJenkinsParameter("PublishUnityProject");
        string PublishUnityBundles = GetJenkinsParameter("PublishUnityBundles");

        Console.WriteLine("发布工程:" + PublishUnityProject);
        Console.WriteLine("发布bundles:" + PublishUnityBundles);
        if (!"none".Equals(PublishUnityBundles))
        {
            PublishRes.OneKeyPublishAllBundle();
        }
        switch (PublishUnityProject)
        {
        case "None":
            break;

        case "Il2cpp":
            Publishil2cppProject_32A64Bit();
            break;

        case "Mono":
            PublishMono2xProject();
            break;
        }
        Console.WriteLine("BuildFromJenkins end");
    }
Beispiel #2
0
    static void DownloadFirstRunBunlde()
    {
        Stopwatch sw = Stopwatch.StartNew();

        CleanIndexFiles();
        PublishRes.DeleteOuterStreamingAssets_AssetBundles();
        Debug.LogWarning("删除文件时间:" + sw.ElapsedMilliseconds / 1000.0f + "ms");

        sw.Restart();
        FileUtil.CopyFolder(GetPackagePcRoot + "/" + Folder + "/StreamingAssets/AssetBundles",
                            AssetBundleHelper.GetOuterStreamingAssetsPath() + "/AssetBundles");
        Debug.LogWarning("复制OuterStreamingAssetsPath文件时间:" + sw.ElapsedMilliseconds / 1000.0f + "ms");

        sw.Restart();
        FileUtil.CopyFolder(GetPackagePcRoot + "/" + Folder + "/StreamingAssets/IndexFiles",
                            AssetBundleHelper.GetOuterStreamingAssetsPath() + "/IndexFiles");
        Debug.LogWarning("复制IndexFiles文件时间:" + sw.ElapsedMilliseconds / 1000.0f + "ms");
    }