- edited description
settings.properties
This relates to #211.
I'd much prefer to refactor settings.properties. the reason: this is related to gradle basically. it's somehow hard to add to classpath with getResourcestream. I've fiddled with it enough, to say it's painful and relative paths should be much preferred.
the file contains two types of settings: one are relative paths, and the other are configurations.
If relative paths are used they are basically hardcoded anyway. I.e. Paths are tied to the code base no matter what. The codebase can contain loadFile(filePath) and filePath is a fixed string such as filePath = ""res/currencies". It's a final static variable.
The configuration parameters reset_every_minutes, refresh_time_seconds, submit_liquidity_seconds we can fix in some config or static members.
app_name=NuBot
version=develop
res_path=res/
log_path=logs/
keystore_path=res/ssl/nubot_keystore.jks
keystore_pass="..."
frozen_folder=res/frozen/
reset_every_minutes=3
refresh_time_seconds=61
submit_liquidity_seconds=130
Comments (16)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter I introduced a StandardConfig class which contains these
reset_every_minutes=3 refresh_time_seconds=61 submit_liquidity_seconds=130
-
reporter - edited description
-
reporter - edited description
-
reporter - changed milestone to 0.2.2 - Configurable Distribution
-
reporter - changed title to settings.properties
-
reporter - marked as enhancement
-
reporter - edited description
-
reporter basically this breaks for me within gradle. if we use relative paths the issue will go away.
public static void loadProperties(String filename) { Global.settings = new Properties(); InputStream input = null; try { input = NuBot.class.getClassLoader().getResourceAsStream(filename);
-
reporter - edited description
-
reporter - changed status to resolved
solved in gradle. can be improved later
-
- changed milestone to 0.3.2 - Configurable Distribution
-
- removed milestone
Removing milestone: 0.3.2 - Configurable Distribution (automated comment)
- Log in to comment