Skip to content
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

Feature/ios local build improvements #3783

Merged
merged 2 commits into from
Jan 27, 2024
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 @@ -59,6 +59,7 @@ public class IPhoneBuilder extends Executor {
private File tmpFile;
private File icon57;
private File icon512;
private static final String DEFAULT_MIN_DEPLOYMENT_VERSION = "12.0";

// StringBuilder used for constructing ruby script with xcodeproj
// which adds localized strings files to the project.
Expand Down Expand Up @@ -209,6 +210,7 @@ private int getDeploymentTargetInt(BuildRequest request) {

@Override
public boolean build(File sourceZip, BuildRequest request) throws BuildException {
addMinDeploymentTarget(DEFAULT_MIN_DEPLOYMENT_VERSION);
defaultEnvironment.put("LANG", "en_US.UTF-8");
tmpFile = tmpDir = getBuildDirectory();
useMetal = "true".equals(request.getArg("ios.metal", "false"));
Expand Down Expand Up @@ -1154,9 +1156,15 @@ public void usesClassMethod(String cls, String method) {
}
}
}

String javacPath = System.getProperty("java.home") + "/../bin/javac";
if (!new File(javacPath).exists()) {
javacPath = System.getProperty("java.home") + "/bin/javac";
}
if (!new File(javacPath).exists()) {
javacPath = "javac";
}
try {
if (!execWithFiles(stubSource, stubSource, ".java", "javac", "-source", "1.6", "-target", "1.6", "-classpath",
if (!execWithFiles(stubSource, stubSource, ".java", javacPath, "-source", "1.6", "-target", "1.6", "-classpath",
classesDir.getAbsolutePath(),
"-d", classesDir.getAbsolutePath())) {
return false;
Expand Down
Loading