Skip to content

Releases: MiSikora/laboratory

0.9.1

12 Nov 17:55
Compare
Choose a tag to compare

Added

  • Builder pattern for Laboratory construction.
  • DefaultOptionFactory that can substitute default options for feature flags read by Laboratory.
  • clear() function to FeatureStorage and Laboratory.

Changed

  • Upgrade to DataStore 1.0.0-alpha03.

Deprecated

  • Laboratory(storage) constructor. Use Laboratory.create(storage) or Laboratory.builder() instead.

0.9.0

11 Nov 15:03
Compare
Choose a tag to compare

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 to Class<Feature<T>> that returns all available feature flag options.
  • defaultOption extension to Class<Feature<T>> that returns a default option of a feature flag.
  • source extension to Class<Feature<*>> that returns a feature flag source if available.
  • description extension to Class<Feature<*>> that returns a feature flag description if available.
  • withOption() and withDefaultOption() to Gradle plugin for adding options to feature flags.
  • defaultOption property to Feature interface.
  • setOption() and setOptions() functions to Laboratory and FeatureStorage.

Changed

  • excludeProjects plugin functions are now called projectFilter and the condition is reversed. Previously they removed projects that matched a condition. Now they allow projects that match it.
  • sourcedWith property on Feature is now named source.
  • Upgrade to Coroutines 1.4.1.

Deprecated

  • withValue() and withDefaultValue() functions in Gradle plugin. withOption() and withDefaultOption() should be used instead.
  • setFeature() and setFeatures() functions. setOption() and setOptions() should be used instead.

Removed

  • ProjectFilter from laboratory-gradle-plugin in favour of java.util.function.Predicate.
  • configure() overload which accepts sources factory as a separate argument.
  • isDefaultValue from Feature interface. defaultOption should be used instead.

Fixed

  • Moved generateSourcedFeatureStorage task to a correct tasks group.

0.8.0

28 Oct 00:01
Compare
Choose a tag to compare

Added

  • KDoc documentation.

Changed

  • Renamed feature/features argument in setFeature() and setFeatures() methods to value/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 from sourcedFeatureStorage() 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

21 Oct 23:16
Compare
Choose a tag to compare

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 now internal.
  • 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

21 Oct 22:13
Compare
Choose a tag to compare

Added

  • FeatureStorage extensions for creation of SharedPreferences based FeatureStorage.
  • FeatureStorage extensions for creation of DataStore based FeatureStorage.
  • Hyperion plugin can be ordered in the debug menu by overriding io_mehow_laboratory_plugin_id resource.

Deprecated

  • SharedPreferenceFeatureStorage soon will become internal.

Changed

  • DataStoreFeatureStorage is now internal. It is not considered a breaking change as DataStore is in the alpha stage.

0.6.1

21 Oct 22:12
Compare
Choose a tag to compare

Fixed

  • Hyperion plugin layout where button was on the wrong side of the debug menu.

0.6.0

21 Oct 22:12
Compare
Choose a tag to compare

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() and Laboratory.experimentIsBlocking() functions that allow to check if a feature flag has particular value.
  • ViewPager2 1.0.0 dependency to laboratory-inspector.
  • RecyclerView 1.1.0 dependency to laboratory-inspector.

Changed

  • LaboratoryActivity requires now a Laboratory instance for initialization. This Laboratory should share FeatureStorage with instances of Laboratory used in the application.

0.5.0

21 Oct 22:11
Compare
Choose a tag to compare

Changed

  • fallback nomenclature to default. This affects Gradle plugin withFallbackValue() and withFallbackSources() functions as well as isFallbackValue property on the Feature interface.

0.4.0

21 Oct 22:10
Compare
Choose a tag to compare

Changed

  • Name of the generated sourced FeatureStorage extension function is now sourcedGenerated() in order to align it with the generated feature factory extension function name.

0.3.0

21 Oct 22:10
Compare
Choose a tag to compare

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 via FeatureStorage.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") and withFallbackSource("Name") functions in feature() 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 customized FeatureStorage that is aware of all available feature flag sources.
  • Gradle plugin has a new featureSourceFactory() function. It works similarly to featureFactory() function with a difference that it collects only feature flag sources.
  • LaboratoryActivity is now configurable with the configure() function.
  • LaboratoryActivity can display different sets of feature flags on separate tabs.
  • FragmentKtx 1.2.5 dependency to laboratory-inspector.
  • ViewModelKtx 2.2.0 dependency to laboratory-inspector.

Changed

  • LaboratoryActivity.initialize() function is renamed to configure().
  • Gradle plugin factory() function is renamed to featureFactory().