dev.jbang.dependencies.Detector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbang-cli Show documentation
Show all versions of jbang-cli Show documentation
JBang Command Line Interface
The newest version!
package dev.jbang.dependencies;
import java.util.List;
import java.util.Properties;
public class Detector extends kr.motd.maven.os.Detector {
public Detector() {
super();
}
@Override
protected void log(String message) {
}
@Override
protected void logProperty(String name, String value) {
}
public void detect(Properties properties, List classiferWithLikes) {
super.detect(properties, classiferWithLikes);
// "hack" to expose a property that works with javafx mac classifers
String os = properties.getProperty("os.detected.name");
if (os.equals("osx")) {
os = "mac";
if ("aarch64".equals(System.getProperty("os.arch"))) {
os = "mac-aarch64";
}
} else if (os.equals("windows")) {
os = "win";
}
properties.setProperty("os.detected.jfxname", os);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy