- The Buncho Java library currently provides very simple support for feature flags.
- Just implement the 'FeatureFlags' interface and you're good to go.
- It has 2 default methods that might do everything you need.
- If not, then override them to do what you want.
- There are 2 ways to set a feature flag:
- Create a file named $baseDir/$featureName_[true, false]
- Set a boolean system property named buncho.$featureName=[true, false]
- The default baseDir for files is ~/.buncho
- The file approach takes precedence over the system property approach, as it is intended for emergency changes without restarting the JVM.
- Examples:
- ~/.buncho/awesomeFeature_true
- -Dbuncho.awesomeFeature=true
- I'm using Java 21, but Buncho will probably work with Java 8.
License: Apache 2.0
