parent
7f4beb6e3f
commit
aca914ab02
|
|
@ -42,7 +42,7 @@ namespace Guru.Editor
|
|||
|
||||
|
||||
|
||||
[PostProcessBuild(45)] // MAX POD Process Order
|
||||
[PostProcessBuild(47)] // MAX POD Process Order
|
||||
public static void PostBuildFixPodDeps(BuildTarget target, string projPath)
|
||||
{
|
||||
if (target != BuildTarget.iOS) return;
|
||||
|
|
@ -74,7 +74,7 @@ namespace Guru.Editor
|
|||
{
|
||||
if (line.Contains(libName))
|
||||
{
|
||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion, minTargetSdk);
|
||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion);
|
||||
isDirty = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -84,10 +84,11 @@ namespace Guru.Editor
|
|||
if (line.Contains(libName))
|
||||
{
|
||||
needAdded.Remove(libName);
|
||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion, minTargetSdk);
|
||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion);
|
||||
isDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needAdded.Count > 0)
|
||||
{
|
||||
|
|
@ -100,17 +101,14 @@ namespace Guru.Editor
|
|||
isDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(isDirty) File.WriteAllLines(podfile, lines);
|
||||
}
|
||||
|
||||
private static string FixOneFirebaseLibVersion(string line, string fixedVersion, string minTargetSdk)
|
||||
private static string FixOneFirebaseLibVersion(string line, string fixedVersion)
|
||||
{
|
||||
line = line.Replace("version =", "version=");
|
||||
string fixedLine = "";
|
||||
|
||||
fixedLine = line.Substring(line.IndexOf("version=") + 9) + $"\"{fixedVersion}\" minTargetSdk=\"{minTargetSdk}\"";
|
||||
|
||||
if(!line.Contains("', '") || !line.Contains("pod")) return line;
|
||||
string fixedLine = line.Substring(0, line.IndexOf("', '") + 4) + $"{fixedVersion}'";
|
||||
return fixedLine;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue