CLI, system properties, environment variables, or JSON text/file input processing.
Go to file
Robinson 7011f7ac45
Hardcoded project name
2023-08-05 12:18:26 -06:00
gradle/wrapper Updated build deps + deps 2023-07-18 01:07:01 +02:00
src/dorkbox/config Updated Config project to use non-moshi Json serialization (this means there is no longer the requirement of generated classes for serialization 2023-08-04 23:12:17 -06:00
src9 Updated Config project to use non-moshi Json serialization (this means there is no longer the requirement of generated classes for serialization 2023-08-04 23:12:17 -06:00
test/dorkbox updated unit tests for full json string comparison 2023-08-04 23:14:52 -06:00
.gitignore Initial import 2022-03-07 01:49:30 +01:00
LICENSE Updated description 2023-08-04 23:23:46 -06:00
LICENSE.Apachev2 Initial split of configuration. 2022-03-07 08:15:57 +01:00
LICENSE.MIT Initial split of configuration. 2022-03-07 08:15:57 +01:00
README.md Updated Config project to use non-moshi Json serialization (this means there is no longer the requirement of generated classes for serialization 2023-08-04 23:12:17 -06:00
build.gradle.kts Updated description 2023-08-04 23:23:46 -06:00
gradle.properties Initial split of configuration. 2022-03-07 08:15:57 +01:00
gradlew Initial split of configuration. 2022-03-07 08:15:57 +01:00
gradlew.bat Initial split of configuration. 2022-03-07 08:15:57 +01:00
settings.gradle.kts Hardcoded project name 2023-08-05 12:18:26 -06:00

README.md

Configuration properties that can be defined via the CLI, system properties, environment variables, or file.

Dorkbox Github Gitlab

This project provides configuration properties, such that ANYTHING in the config file can ALSO be passed in on the command line or as an env/system property

commandline > system property > environment variable > properties file

Once a property has been defined, it cannot be overloaded again via a different method, as specified in the above hierarchy,

During a save operation, overloaded values will be ignored unless they were manually changed to something different

Additionally, it is possible to set an environment variable names that might conflict with the standard set of names, for example,

PATH
  • The system uses PATH, but if we want to use path for something different, we can via setting the prefix.
  • For example, setting the prefix to CONFIG__ means that for us to set the path property, we set it via
CONFIG__path="/home/blah/whatever"
  • And this way, OUR path does not conflict with the system path.

Maven Info

<dependencies>
    ...
    <dependency>
      <groupId>com.dorkbox</groupId>
      <artifactId>Config</artifactId>
      <version>2.0</version>
    </dependency>
</dependencies>

Gradle Info

dependencies {
    ...
    implementation("com.dorkbox:Config:2.0")
}

License

This project is © 2022 dorkbox llc, and is distributed under the terms of the Apache v2.0 License. See file "LICENSE" for further references.