Skip to content

Commit

Permalink
Update AnalyticsFixPropertyRemover.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-maurice committed Feb 26, 2024
1 parent bb4300d commit cad323c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/app/src/AnalyticsFixPropertyRemover.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ public void OnPreprocessBuild(BuildReport report) {
return;
}

Debug.Log("====== Found the following Gradle Version: " + GooglePlayServices.PlayServicesResolver.AndroidGradlePluginVersion);
Debug.Log("=-=-= Found the following Gradle Version: " + GooglePlayServices.PlayServicesResolver.AndroidGradlePluginVersion);

// If the gradle version is newer than 7.0.0, which should have support
// for the property tag, there is no reason to add the removeAll logic.
var versionComparer = new Google.JarResolver.Dependency.VersionComparer();
if (versionComparer.Compare(
GooglePlayServices.PlayServicesResolver.AndroidGradlePluginVersion,
"7.0.0") >= 0) {
Debug.Log("=-=-= Returning early because version is new enough");
return;
}

Expand All @@ -78,6 +79,7 @@ public void OnPreprocessBuild(BuildReport report) {

// Check for the SearchTag, and if present there is nothing to do.
if (File.ReadAllText(androidManifestPath).Contains(SearchTag)) {
Debug.Log("=-=-= Returning early because found the searchtag");
return;
}

Expand Down Expand Up @@ -109,6 +111,8 @@ public void OnPreprocessBuild(BuildReport report) {
else {
Debug.LogError("Could not find the 'application' node in the AndroidManifest.xml file.");
}

Debug.Log("=-=-= The removeAll tag should be added");
}
}
}

0 comments on commit cad323c

Please sign in to comment.