Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
britzl committed Oct 27, 2023
1 parent 6dd21ac commit ec65564
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
1 change: 0 additions & 1 deletion server/src/main/java/com/defold/extender/Extender.java
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,6 @@ else if (platform.contains("osx")) {
File o = addCompileFileSwift(pod, i, src, mergedContextWithPodsForC, compileSwiftCommands);
objs.add(ExtenderUtil.getRelativePath(jobDirectory, o));
}
// compilePodSwiftFilesToModule(pod, mergedContextWithPodsForC, compileSwiftCommands);
ProcessExecutor.executeCommands(processExecutor, compileSwiftCommands); // in parallel
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public class PodSpec {
public String osxversion = "";
public String iosModuleMap = null;
public String osxModuleMap = null;
// Set to true if this Pod contains at least on .xcframework
// Set to true if this Pod contains at least one .xcframework
public Boolean containsFramework = false;
// The Swift source file header (ModuleName-Swift.h)
// This file is referenced from the modulemap and generated in
Expand Down Expand Up @@ -817,26 +817,13 @@ private void createModuleMap(PodSpec pod, Set<String> headerPatterns, File modul
}
}

private File createModuleMapFile(PodSpec pod, String platform) {
String filename = null;
if (pod.parentSpec != null) {
filename = pod.parentSpec.moduleName + "-" + pod.moduleName;
}
else {
filename = pod.moduleName;
}
filename += "-" + platform + ".modulemap";
filename = "module.modulemap";
return new File(pod.generatedDir, filename);
}

private String createIosModuleMap(PodSpec pod, File jobDir) throws ExtenderException {
File moduleMapFile = createModuleMapFile(pod, "ios");
File moduleMapFile = new File(pod.generatedDir, "module.modulemap");
createModuleMap(pod, pod.publicHeaders.ios, moduleMapFile, jobDir);
return moduleMapFile.getAbsolutePath();
}
private String createOsxModuleMap(PodSpec pod, File jobDir) throws ExtenderException {
File moduleMapFile = createModuleMapFile(pod, "osx");
File moduleMapFile = new File(pod.generatedDir, "module.modulemap");
createModuleMap(pod, pod.publicHeaders.osx, moduleMapFile, jobDir);
return moduleMapFile.getAbsolutePath();
}
Expand All @@ -849,7 +836,7 @@ private PodSpec createPodSpec(JSONObject specJson, PodSpec parent, File podsDir,
spec.moduleName = (String)specJson.get("module_name");
}
else {
// NSData+zlib -> NSData_zlib
// NSData+zlib -> NSData
spec.moduleName = ((String)specJson.get("name")).replaceAll("[\\+].*", "");
}
spec.version = (parent == null) ? (String)specJson.get("version") : parent.version;
Expand Down

0 comments on commit ec65564

Please sign in to comment.