private void Init(PostProcessorContext context, string targetPath)
 {
     this.m_Context          = context;
     this.m_UnityJavaSources = Path.Combine(context.Get <string>("PlayerPackage"), "Source");
     string[] components = new string[] { TasksCommon.GetClassDirectory(context), "classes.jar" };
     this.m_UnityJavaLibrary       = Paths.Combine(components);
     this.m_UnityAndroidBuildTools = BuildPipeline.GetBuildToolsDirectory(BuildTarget.Android);
     this.m_StagingArea            = context.Get <string>("StagingArea");
     this.m_AndroidLibraries       = context.Get <AndroidLibraries>("AndroidLibraries");
     this.m_TargetPath             = targetPath;
     this.m_PackageName            = context.Get <string>("PackageName");
     this.m_ProductName            = PlayerSettings.productName;
     this.m_TargetSDKVersion       = context.Get <int>("TargetSDKVersion");
     this.m_GoogleBuildTools       = context.Get <AndroidSDKTools>("SDKTools").BuildToolsVersion(null);
     this.m_UseObb             = context.Get <bool>("UseObb");
     this.m_AndroidPluginsPath = context.Get <string>("AndroidPluginsPath");
 }
Ejemplo n.º 2
0
        private static void GenerateProjectProperties(string m_TargetPath, int m_PlatformApiLevel, AndroidLibraries m_AndroidLibraries)
        {
            int    num      = 1;
            string contents = "target=android-" + m_PlatformApiLevel + "\n";

            foreach (string str2 in m_AndroidLibraries)
            {
                string   str3      = contents;
                object[] objArray1 = new object[] { str3, "android.library.reference.", num++, "=../", Path.GetFileName(str2), "\n" };
                contents = string.Concat(objArray1);
            }
            File.WriteAllText(Path.Combine(m_TargetPath, "project.properties"), contents);
        }