Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
445fa51
Add LICENSE.txt.
gwhelanLD Aug 25, 2020
addd2a8
Add initial template for changelog.
gwhelanLD Aug 25, 2020
291969d
Filing in some basic fields for packages.
gwhelanLD Aug 25, 2020
1cac476
Accidentally create plugin without organization.
gwhelanLD Aug 25, 2020
18fdcce
Basic initial implementation of bridging SDK calls to native SDKs.
gwhelanLD Sep 4, 2020
6ecc3fc
Merge pull request #1 from launchdarkly/initial-stuff
gwhelanLD Sep 9, 2020
3e46824
Commit most to changes for bridging.
gwhelanLD Oct 12, 2020
91b169c
Fix dependencies.
gwhelanLD Oct 12, 2020
d954690
Reorganize to use mini library.
gwhelanLD Oct 12, 2020
d8af9ac
Add missing ldconfig options.
gwhelanLD Oct 15, 2020
29ead05
Add missing config options to kotlin native bridge.
gwhelanLD Oct 15, 2020
101366b
Extend LDValue with convenience builders.
gwhelanLD Oct 15, 2020
363028e
Add Android allFlags.
gwhelanLD Oct 16, 2020
e9c274d
Fix type error with allFlags bridging.
gwhelanLD Oct 16, 2020
d185217
Consistency renames.
gwhelanLD Oct 16, 2020
9e2584f
Improve handling of json and casting.
gwhelanLD Oct 16, 2020
8e94ffa
Better json handling on ios.
gwhelanLD Oct 16, 2020
1f564f0
Fix what I just broke.
gwhelanLD Oct 16, 2020
2dc791e
Actually fix changes. Stupid type inference disambiguation changes.
gwhelanLD Oct 16, 2020
79e3669
Add experimentation to track.
gwhelanLD Oct 16, 2020
db46e97
Custom handling.
gwhelanLD Oct 19, 2020
e9d8597
Evaluation details.
gwhelanLD Oct 19, 2020
aeaadc7
Handle null case.
gwhelanLD Oct 19, 2020
6003c7c
Fix type casting on evaluation detail.
gwhelanLD Oct 19, 2020
c93aea9
Last bit of implementation.
gwhelanLD Oct 20, 2020
ac487e0
Remove useless field.
gwhelanLD Oct 20, 2020
7eb1943
Merge pull request #2 from launchdarkly/gw/ch89546/bridging
gwhelanLD Oct 23, 2020
a34a83e
Add doc comments, tests, circleci build. (#3)
gwhelanLD Oct 28, 2020
5a6216a
Add initial public release changelog and update version to 0.1.0.
gwhelanLD Oct 29, 2020
2f66074
Update changelog.
gwhelanLD Oct 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: 2.1

jobs:
build:
macos:
xcode: "12.0.1"
shell: /bin/bash --login -eo pipefail
environment:
TERM: dumb
QEMU_AUDIO_DRV: none
JAVA_HOME: "/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Xms2048m -Xmx4096m"
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
JVM_OPTS: -Xmx3200m
ANDROID_HOME: "/usr/local/share/android-sdk"
ANDROID_SDK_HOME: "/usr/local/share/android-sdk"
ANDROID_SDK_ROOT: "/usr/local/share/android-sdk"

steps:
- checkout

- run:
name: Setup env
command: |
echo 'export PATH="$PATH:/usr/local/share/android-sdk/tools/bin"' >> $BASH_ENV
echo 'export PATH="$PATH:/usr/local/share/android-sdk/platform-tools"' >> $BASH_ENV
echo 'export PATH="$PATH:/usr/local/Caskroom/flutter/1.20.4/flutter/.pub-cache/bin"' >> $BASH_ENV

- run:
name: Install Android SDK, Flutter and dartdoc
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install homebrew/cask-versions/adoptopenjdk8
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk
yes | sdkmanager "platform-tools" | grep -v = || true
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install flutter
flutter pub global activate dartdoc

- run:
name: Acknowledge Android licenses
command: sudo mkdir -p /usr/local/android-sdk-linux/licenses

- run:
name: Run pure Dart tests
command: flutter test

- run:
name: Build Android application APK
command: cd example && flutter build apk --debug

- run:
name: Build iOS application
command: cd example && flutter build ios --simulator

- run:
name: Build documentation
command: dartdoc
when: always

- store_artifacts:
path: doc
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Is this a support request?**
This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing support@launchdarkly.com.

Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above.

**Describe the bug**
A clear and concise description of what the bug is.

**To reproduce**
Steps to reproduce the behavior.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, add any log output related to your problem.

**SDK version**
The version of this SDK that you are using.

**Language version, developer tools**
For instance, Go 1.11 or Ruby 2.5.3. If you are using a language that requires a separate compiler, such as C, please include the name and version of the compiler too.

**OS/platform**
For instance, Ubuntu 16.04, Windows 10, or Android 4.0.3. If your code is running in a browser, please also include the browser type and version.

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I would love to see the SDK [...does something new...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context about the feature request here.
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**Requirements**

- [ ] I have added test coverage for new or changed functionality
- [ ] I have followed the repository's [pull request submission guidelines](../blob/master/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have validated my changes against all supported platform versions

**Related issues**

Provide links to any issues in this repository or elsewhere relating to this pull request.

**Describe the solution you've provided**

Provide a clear and concise description of what you expect to happen.

**Describe alternatives you've considered**

Provide a clear and concise description of any alternative solutions or features you've considered.

**Additional context**

Add any other context about the pull request here.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
.pub/

build/
.gradle

.idea/workspace.xml
45 changes: 0 additions & 45 deletions .idea/workspace.xml

This file was deleted.

14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.0.1
# Change log

* TODO: Describe initial release.
All notable changes to the LaunchDarkly Flutter client-side SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).

## [0.1.0] - 2020-10-29
This is the first public release of the LaunchDarkly Flutter client-side SDK. The SDK is considered to be an unsupported beta until release 1.0.0.

### Added
- Support for configuring and initializing a SDK instance.
- Flag evaluation with and without details.
- Retrieving all flag values for the current user.
- Switching users with `identify`.
- Flag change listeners and flags received listeners.
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Contributing to the LaunchDarkly Client SDK for Flutter
================================================

LaunchDarkly has published an [SDK contributor's guide](https://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work. See below for additional information on how to contribute to this SDK.

Submitting bug reports and feature requests
------------------

The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/flutter-client-sdk/issues) in the SDK repository. Bug reports and feature requests specific to this SDK should be filed in this issue tracker. The SDK team will respond to all newly filed issues within two business days.

Submitting pull requests
------------------

We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.

Build instructions
------------------

### Prerequisites

See the [Flutter install](https://flutter.dev/docs/get-started/install) page for setting up Flutter for building Android and iOS plugins.

### Building

The `flutter` command line tool can be used to build and run the example application for manual testing. Run `flutter run` in the `example` directory.

### Testing

To run the unit tests for the SDK, run `flutter test` in the SDK repo. These tests only cover the pure Dart behavior of the SDK, not the native plugin code that wraps the native SDKs.
1 change: 0 additions & 1 deletion LICENSE

This file was deleted.

13 changes: 13 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2020 Catamorphic, Co.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
62 changes: 52 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,57 @@
# launchdarkly_flutter_client_sdk
LaunchDarkly Client SDK for Flutter
===========================

A new flutter plugin project.
[![Circle CI](https://circleci.com/gh/launchdarkly/flutter-client-sdk.svg?style=shield)](https://circleci.com/gh/launchdarkly/flutter-client-sdk)

## Getting Started
*This version of the SDK is a **beta** version and should not be considered ready for production use while this message is visible.*

This project is a starting point for a Flutter
[plug-in package](https://flutter.dev/developing-packages/),
a specialized package that includes platform-specific implementation code for
Android and/or iOS.
LaunchDarkly overview
-------------------------
[LaunchDarkly](https://www.launchdarkly.com) is a feature management platform that serves over 100 billion feature flags daily to help teams build better software, faster. [Get started](https://docs.launchdarkly.com/docs/getting-started) using LaunchDarkly today!

For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)

Supported Platform versions
-------------------------

See the [pubspec.yaml](pubspec.yaml) file for Flutter version requirements.

On the Android platform, the SDK requires a minimum SDK version of 16.

On the iOS platform, the SDK requires a minimum version of 10.0.

Getting started
-----------

Refer to the [SDK documentation](https://docs.launchdarkly.com/sdk/client-side/flutter#getting-started) for instructions on getting started with using the SDK.

Learn more
-----------

Check out our [documentation](https://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](https://docs.launchdarkly.com/sdk/client-side/flutter) or our [code-generated API documentation](https://launchdarkly.github.io/flutter-client-sdk/).

Testing
-------

We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.

Contributing
------------

We encourage pull requests and other contributions from the community. Check out our [contributing guidelines](CONTRIBUTING.md) for instructions on how to contribute to this SDK.

About LaunchDarkly
-----------

* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
* Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
* Explore LaunchDarkly
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies# launchdarkly_flutter_client_sdk_example
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'com.example.launchdarkly_flutter_client_sdk'
group 'com.launchdarkly.launchdarkly_flutter_client_sdk'
version '1.0-SNAPSHOT'

buildscript {
Expand Down Expand Up @@ -40,4 +40,6 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.launchdarkly:launchdarkly-android-client-sdk:2.13.0'
implementation 'com.google.code.gson:gson:2.8.2'
}
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.launchdarkly_flutter_client_sdk">
package="com.launchdarkly.launchdarkly_flutter_client_sdk">
</manifest>

This file was deleted.

Loading