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)
|
public static void PostBuildFixPodDeps(BuildTarget target, string projPath)
|
||||||
{
|
{
|
||||||
if (target != BuildTarget.iOS) return;
|
if (target != BuildTarget.iOS) return;
|
||||||
|
|
@ -74,7 +74,7 @@ namespace Guru.Editor
|
||||||
{
|
{
|
||||||
if (line.Contains(libName))
|
if (line.Contains(libName))
|
||||||
{
|
{
|
||||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion, minTargetSdk);
|
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion);
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -84,10 +84,11 @@ namespace Guru.Editor
|
||||||
if (line.Contains(libName))
|
if (line.Contains(libName))
|
||||||
{
|
{
|
||||||
needAdded.Remove(libName);
|
needAdded.Remove(libName);
|
||||||
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion, minTargetSdk);
|
lines[i] = FixOneFirebaseLibVersion(line, fixedVersion);
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (needAdded.Count > 0)
|
if (needAdded.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -100,17 +101,14 @@ namespace Guru.Editor
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(isDirty) File.WriteAllLines(podfile, lines);
|
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=");
|
if(!line.Contains("', '") || !line.Contains("pod")) return line;
|
||||||
string fixedLine = "";
|
string fixedLine = line.Substring(0, line.IndexOf("', '") + 4) + $"{fixedVersion}'";
|
||||||
|
|
||||||
fixedLine = line.Substring(line.IndexOf("version=") + 9) + $"\"{fixedVersion}\" minTargetSdk=\"{minTargetSdk}\"";
|
|
||||||
|
|
||||||
return fixedLine;
|
return fixedLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue