use of com.bladecoder.engineeditor.common.OrderedProperties in project bladecoder-adventure-engine by bladecoder.
the class Project method getGradleProperties.
public Properties getGradleProperties() throws FileNotFoundException, IOException {
Properties prop = new OrderedProperties();
prop.load(new FileReader(Ctx.project.getProjectDir().getAbsolutePath() + "/gradle.properties"));
return prop;
}
use of com.bladecoder.engineeditor.common.OrderedProperties in project bladecoder-adventure-engine by bladecoder.
the class PackageDialog method setCurrentVersion.
/**
* Saves the selected version
*/
private void setCurrentVersion(String version) {
try {
OrderedProperties prop = Ctx.project.getGradleProperties(Ctx.project.getProjectDir());
prop.setProperty("version", version);
Ctx.project.saveGradleProperties(prop, Ctx.project.getProjectDir());
} catch (IOException e) {
Message.showMsg(getStage(), "Error reading file 'gradle.properties' from the game.", 3);
}
}
use of com.bladecoder.engineeditor.common.OrderedProperties in project bladecoder-adventure-engine by bladecoder.
the class I18NHandler method loadI18N.
private OrderedProperties loadI18N(String modelFilename) {
String i18nFilename = getI18NFilename(modelFilename);
// To save in alphabetical order we use the OrderedProperties
OrderedProperties i18n = new OrderedPropertiesBuilder().withSuppressDateInComment(true).withOrdering().build();
try {
i18n.load(new InputStreamReader(new FileInputStream(i18nFilename), I18N.ENCODING));
} catch (IOException e) {
EditorLogger.error("ERROR LOADING BUNDLE: " + i18nFilename);
}
return i18n;
}
use of com.bladecoder.engineeditor.common.OrderedProperties in project bladecoder-adventure-engine by bladecoder.
the class Project method updateEngineVersion.
public void updateEngineVersion(File projectPath) throws FileNotFoundException, IOException {
OrderedProperties prop = getGradleProperties(projectPath);
prop.setProperty(Config.BLADE_ENGINE_VERSION_PROP, Versions.getVersion());
prop.setProperty("gdxVersion", Versions.getLibgdxVersion());
prop.setProperty("roboVMVersion", Versions.getRoboVMVersion());
prop.setProperty("roboVMGradlePluginVersion", Versions.getROBOVMGradlePluginVersion());
prop.setProperty("androidGradlePluginVersion", Versions.getAndroidGradlePluginVersion());
prop.setProperty("bladeInkVersion", Versions.getBladeInkVersion());
saveGradleProperties(prop, projectPath);
}
Aggregations