Releases: MiSikora/laboratory
Releases · MiSikora/laboratory
0.9.1
Added
- Builder pattern for
Laboratory
construction. DefaultOptionFactory
that can substitute default options for feature flags read byLaboratory
.clear()
function toFeatureStorage
andLaboratory
.
Changed
- Upgrade to DataStore
1.0.0-alpha03
.
Deprecated
Laboratory(storage)
constructor. UseLaboratory.create(storage)
orLaboratory.builder()
instead.
0.9.0
Added
- Groovy DSL for adding feature flags via Gradle plugin. This is equivalent to
feature("SomeFeatureFlag")
function.laboratory { SomeFeatureFlag { withDefaultOption("Enabled") withOption("Disabled") } }
options
extension toClass<Feature<T>>
that returns all available feature flag options.defaultOption
extension toClass<Feature<T>>
that returns a default option of a feature flag.source
extension toClass<Feature<*>>
that returns a feature flag source if available.description
extension toClass<Feature<*>>
that returns a feature flag description if available.withOption()
andwithDefaultOption()
to Gradle plugin for adding options to feature flags.defaultOption
property toFeature
interface.setOption()
andsetOptions()
functions toLaboratory
andFeatureStorage
.
Changed
excludeProjects
plugin functions are now calledprojectFilter
and the condition is reversed. Previously they removed projects that matched a condition. Now they allow projects that match it.sourcedWith
property onFeature
is now namedsource
.- Upgrade to Coroutines
1.4.1
.
Deprecated
withValue()
andwithDefaultValue()
functions in Gradle plugin.withOption()
andwithDefaultOption()
should be used instead.setFeature()
andsetFeatures()
functions.setOption()
andsetOptions()
should be used instead.
Removed
ProjectFilter
fromlaboratory-gradle-plugin
in favour ofjava.util.function.Predicate
.configure()
overload which accepts sources factory as a separate argument.isDefaultValue
fromFeature
interface.defaultOption
should be used instead.
Fixed
- Moved
generateSourcedFeatureStorage
task to a correct tasks group.
0.8.0
Added
- KDoc documentation.
Changed
- Renamed
feature
/features
argument insetFeature()
andsetFeatures()
methods tovalue
/values
respectively. - Elevation is no longer an attribute in the
IoMehowLaboratory.Theme
and a regular resource is used instead. This makes sure that when an Activity theme is overridden externally it won't crash for an unknown attribute. - Flatten Hyperion button to visually match other items.
- Upgrade to Coroutines
1.4.0
. - Upgrade to Wire
3.5.0
.
Removed
generateFactory
property fromsourcedFeatureStorage()
method in Gradle plugin. It was added to the public API by a mistake and wasn't responsible for anything.- Wire dependency from the
library-shared-preferences
artifact. It was added by a mistake. BuildConfig
classes from Android library modules.
0.7.0
Changed
- Changelog format follows now Keep a Changelog format. Format is applied retroactively to this file.
- R8 rules are now a part of
META-INF
of thelaboratory
artifact. SharedPreferencesFeatureStorage
is nowinternal
.- Gradle plugin no longer has a runtime dependency on Android Gradle Plugin.
laboratory-generator
generates source code compatible with the explicit API mode.- Set compile SDK to
30
. - Upgrade to KotlinPoet
1.7.2
. - Upgrade to Hyperion
0.9.30
. - Upgrade to DataStore
1.0.0-alpha02
.
0.6.2
Added
FeatureStorage
extensions for creation ofSharedPreferences
basedFeatureStorage
.FeatureStorage
extensions for creation ofDataStore
basedFeatureStorage
.- Hyperion plugin can be ordered in the debug menu by overriding
io_mehow_laboratory_plugin_id
resource.
Deprecated
SharedPreferenceFeatureStorage
soon will becomeinternal
.
Changed
DataStoreFeatureStorage
is nowinternal
. It is not considered a breaking change asDataStore
is in the alpha stage.
0.6.1
0.6.0
Added
Feature
can have now description. It can be used to add more contextual data to feature flags.LaboratoryActivity
observes changes to feature flags instead of loading them every time the screen is opened.LaboratoryActivity
displays feature flag sources next to them and allows users to select a source from a drop down menu.- Remote feature flag values are displayed in
LaboratoryActivity
if a source is not local. - When a remote source is used for a feature flag a value cannot be changed from
LaboratoryActivity
. LaboratoryActivity
displays feature flag descriptions if they are present.LaboratoryActivity
can reset feature flag values to their default state from an item in the action bar.Laboratory.experimentIs()
andLaboratory.experimentIsBlocking()
functions that allow to check if a feature flag has particular value.- ViewPager2
1.0.0
dependency tolaboratory-inspector
. - RecyclerView
1.1.0
dependency tolaboratory-inspector
.
Changed
LaboratoryActivity
requires now aLaboratory
instance for initialization. ThisLaboratory
should shareFeatureStorage
with instances ofLaboratory
used in the application.
0.5.0
0.4.0
0.3.0
Added
- Feature flags can have multiple sources. Source is also a feature flag and is optional. If no source is available it is assumed that only a local source is controlled.
FeatureStorage
that connects feature flags with their sources. It is available viaFeatureStorage.sourced()
extension function. Feature flag sources are uniquely identified only by their value names.- Feature flag sources can be set from the Gradle plugin with
withSource("Name")
andwithFallbackSource("Name")
functions infeature()
blocks. Any source that has the name "Local" (or a variant of it) is filtered out. - Gradle plugin has a new
sourcedStorage()
function. It is responsible for generating a customizedFeatureStorage
that is aware of all available feature flag sources. - Gradle plugin has a new
featureSourceFactory()
function. It works similarly tofeatureFactory()
function with a difference that it collects only feature flag sources. LaboratoryActivity
is now configurable with theconfigure() function
.LaboratoryActivity
can display different sets of feature flags on separate tabs.- FragmentKtx
1.2.5
dependency tolaboratory-inspector
. - ViewModelKtx
2.2.0
dependency tolaboratory-inspector
.
Changed
LaboratoryActivity.initialize()
function is renamed toconfigure()
.- Gradle plugin
factory()
function is renamed tofeatureFactory()
.