io.github.javacodesign.Notarizer Maven / Gradle / Ivy
package io.github.javacodesign;
import com.github.tools1000.CommandRunner;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import net.lingala.zip4j.ZipFile;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
@RequiredArgsConstructor
@Slf4j
public class Notarizer extends JavaCommandRunner {
private final Path inputPath;
private final String keychainProfile;
public boolean notarize() throws IOException {
verifyInput(this.inputPath);
verifyInput(this.keychainProfile);
return runCommand(buildNotarizeCommand());
}
private List buildNotarizeCommand() {
List result = new ArrayList<>();
result.add("xcrun");
result.add("notarytool");
result.add("submit");
result.add(inputPath.toString());
result.add("--wait");
result.add("--keychain-profile");
result.add(keychainProfile);
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy