Skip to content

[Xamarin.Android.Build.Tasks] Set PROGUARD_HOME on Windows for related ToolTasks #550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -470,12 +470,13 @@ public static Dictionary<string, string> LoadAcwMapFile (string acwPath)

public static string [] GetProguardEnvironmentVaribles (string proguardHome)
{
string proguardHomeVariable = "PROGUARD_HOME=" + proguardHome;

return Environment.OSVersion.Platform == PlatformID.Unix ?
new string [] { "PROGUARD_HOME=" + proguardHome } :
//TODO ReAdd the PROGUARD_HOME env variable once we are shipping our own proguard
new string [] { proguardHomeVariable } :
// Windows seems to need special care, needs JAVA_TOOL_OPTIONS.
// On the other hand, xbuild has a bug and fails to parse '=' in the value, so we skip JAVA_TOOL_OPTIONS on Mono runtime.
new string [] { "JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8" };
new string [] { proguardHomeVariable, "JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8" };
}
}
}