Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 6acdbac

Browse files
authored
prepare 4.6.4 release (#159)
1 parent 111f1cb commit 6acdbac

13 files changed

+83
-127
lines changed

.circleci/config.yml

-15
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ jobs:
4141
name: run packaging tests
4242
command: cd packaging-test && make all
4343

44-
fossa:
45-
docker:
46-
- image: circleci/java
47-
steps:
48-
- checkout
49-
- run: cp gradle.properties.example gradle.properties
50-
- run: ./gradlew dependencies
51-
- run: curl https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
52-
- run: fossa analyze
53-
5444
workflows:
5545
version: 2
5646
test:
@@ -67,8 +57,3 @@ workflows:
6757
branches:
6858
ignore:
6959
- gh-pages
70-
- fossa:
71-
filters:
72-
branches:
73-
ignore:
74-
- gh-pages

.fossa.yaml

-11
This file was deleted.

CHANGELOG.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33

44
All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
55

6+
# Note on future releases
7+
8+
The LaunchDarkly SDK repositories are being renamed for consistency. This repository is now `java-server-sdk` rather than `java-client`.
9+
10+
The artifact names will also change. In the 4.6.3 release, the generated artifact was named `com.launchdarkly.client:launchdarkly-client`; in all future releases, it will be `com.launchdarkly.client:launchdarkly-java-server-sdk`.
11+
612
## [4.6.3] - 2019-03-21
713
### Fixed
8-
- The SDK uberjars contained some JSR305 annotation classes such as `javax.annotation.Nullable`. These have been removed. They were not being used in the public API anyway. ([#156](https://github.com/launchdarkly/java-client/issues/156))
14+
- The SDK uberjars contained some JSR305 annotation classes such as `javax.annotation.Nullable`. These have been removed. They were not being used in the public API anyway. ([#156](https://github.com/launchdarkly/java-server-sdk/issues/156))
915
- If `track` or `identify` is called without a user, the SDK now logs a warning, and does not send an analytics event to LaunchDarkly (since it would not be processed without a user).
1016

1117
## [4.6.2] - 2019-02-21
@@ -45,7 +51,7 @@ It is now possible to inject feature flags into the client from local JSON or YA
4551

4652
## [4.4.1] - 2018-10-15
4753
### Fixed:
48-
- The SDK's Maven releases had a `pom.xml` that mistakenly referenced dependencies that are actually bundled (with shading) inside of our jar, resulting in those dependencies being redundantly downloaded and included (without shading) in the runtime classpath, which could cause conflicts. This has been fixed. ([#122](https://github.com/launchdarkly/java-client/issues/122))
54+
- The SDK's Maven releases had a `pom.xml` that mistakenly referenced dependencies that are actually bundled (with shading) inside of our jar, resulting in those dependencies being redundantly downloaded and included (without shading) in the runtime classpath, which could cause conflicts. This has been fixed. ([#122](https://github.com/launchdarkly/java-server-sdk/issues/122))
4955

5056
## [4.4.0] - 2018-10-01
5157
### Added:
@@ -67,7 +73,7 @@ It is now possible to inject feature flags into the client from local JSON or YA
6773
## [4.3.0] - 2018-08-27
6874
### Added:
6975
- The new `LDClient` method `allFlagsState()` should be used instead of `allFlags()` if you are passing flag data to the front end for use with the JavaScript SDK. It preserves some flag metadata that the front end requires in order to send analytics events correctly. Versions 2.5.0 and above of the JavaScript SDK are able to use this metadata, but the output of `allFlagsState()` will still work with older versions.
70-
- The `allFlagsState()` method also allows you to select only client-side-enabled flags to pass to the front end, by using the option `FlagsStateOption.CLIENT_SIDE_ONLY`. ([#112](https://github.com/launchdarkly/java-client/issues/112))
76+
- The `allFlagsState()` method also allows you to select only client-side-enabled flags to pass to the front end, by using the option `FlagsStateOption.CLIENT_SIDE_ONLY`. ([#112](https://github.com/launchdarkly/java-server-sdk/issues/112))
7177
- The new `LDClient` methods `boolVariationDetail`, `intVariationDetail`, `doubleVariationDetail`, `stringVariationDetail`, and `jsonVariationDetail` allow you to evaluate a feature flag (using the same parameters as you would for `boolVariation`, etc.) and receive more information about how the value was calculated. This information is returned in an `EvaluationDetail` object, which contains both the result value and an `EvaluationReason` which will tell you, for instance, if the user was individually targeted for the flag or was matched by one of the flag's rules, or if the flag returned the default value due to an error.
7278

7379
### Fixed:
@@ -97,7 +103,7 @@ It is now possible to inject feature flags into the client from local JSON or YA
97103
## [4.1.0] - 2018-05-15
98104

99105
### Added:
100-
- The new user builder methods `customValues` and `privateCustomValues` allow you to add a custom user attribute with multiple JSON values of mixed types. ([#126](https://github.com/launchdarkly/java-client/issues/126))
106+
- The new user builder methods `customValues` and `privateCustomValues` allow you to add a custom user attribute with multiple JSON values of mixed types. ([#126](https://github.com/launchdarkly/java-server-sdk/issues/126))
101107
- The new constant `VersionedDataKind.ALL` is a list of all existing `VersionedDataKind` instances. This is mainly useful if you are writing a custom `FeatureStore` implementation.
102108

103109
## [4.0.0] - 2018-05-10
@@ -124,7 +130,7 @@ It is now possible to inject feature flags into the client from local JSON or YA
124130

125131
## [3.0.2] - 2018-03-01
126132
### Fixed
127-
- Improved performance when evaluating flags with custom attributes, by avoiding an unnecessary caught exception (thanks, [rbalamohan](https://github.com/launchdarkly/java-client/issues/113)).
133+
- Improved performance when evaluating flags with custom attributes, by avoiding an unnecessary caught exception (thanks, [rbalamohan](https://github.com/launchdarkly/java-server-sdk/issues/113)).
128134

129135

130136
## [3.0.1] - 2018-02-22
@@ -143,7 +149,7 @@ _This release was broken and should not be used._
143149

144150
## [2.6.1] - 2018-03-01
145151
### Fixed
146-
- Improved performance when evaluating flags with custom attributes, by avoiding an unnecessary caught exception (thanks, [rbalamohan](https://github.com/launchdarkly/java-client/issues/113)).
152+
- Improved performance when evaluating flags with custom attributes, by avoiding an unnecessary caught exception (thanks, [rbalamohan](https://github.com/launchdarkly/java-server-sdk/issues/113)).
147153

148154

149155
## [2.6.0] - 2018-02-12
@@ -223,7 +229,7 @@ _This release was broken and should not be used._
223229

224230
## [2.2.1] - 2017-04-25
225231
### Fixed
226-
- [#92](https://github.com/launchdarkly/java-client/issues/92) Regex `matches` targeting rules now include the user if
232+
- [#92](https://github.com/launchdarkly/java-server-sdk/issues/92) Regex `matches` targeting rules now include the user if
227233
a match is found anywhere in the attribute. Before fixing this bug, the entire attribute needed to match the pattern.
228234

229235
## [2.2.0] - 2017-04-11
@@ -273,15 +279,15 @@ feature flag's existence. Thanks @yuv422!
273279

274280
## [2.0.3] - 2016-10-10
275281
### Added
276-
- StreamingProcessor now supports increasing retry delays with jitter. Addresses [https://github.com/launchdarkly/java-client/issues/74[(https://github.com/launchdarkly/java-client/issues/74)
282+
- StreamingProcessor now supports increasing retry delays with jitter. Addresses [https://github.com/launchdarkly/java-server-sdk/issues/74[(https://github.com/launchdarkly/java-server-sdk/issues/74)
277283

278284
## [2.0.2] - 2016-09-13
279285
### Added
280286
- Now publishing artifact with 'all' classifier that includes SLF4J for ColdFusion or other systems that need it.
281287

282288
## [2.0.1] - 2016-08-12
283289
### Removed
284-
- Removed slf4j from default artifact: [#71](https://github.com/launchdarkly/java-client/issues/71)
290+
- Removed slf4j from default artifact: [#71](https://github.com/launchdarkly/java-server-sdk/issues/71)
285291

286292
## [2.0.0] - 2016-08-08
287293
### Added

CONTRIBUTING.md

+33-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,42 @@
1-
Contributing to the LaunchDarkly SDK for Java
1+
Contributing to the LaunchDarkly Server-side SDK for Java
22
================================================
3+
4+
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.
5+
6+
## Submitting bug reports and feature requests
7+
8+
The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/java-server-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.
9+
10+
## Submitting pull requests
11+
12+
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.
13+
14+
## Build instructions
15+
16+
### Prerequisites
17+
18+
The SDK builds with [Gradle](https://gradle.org/) and should be built against Java 7.
19+
20+
### Building
321

4-
We encourage pull-requests and other contributions from the community. We've also published an [SDK contributor's guide](http://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work.
5-
6-
7-
Testing Proxy Settings
8-
==================
9-
Installation is your own journey, but your squid.conf file should have auth/access sections that look something like this:
22+
To build the SDK without running any tests:
23+
```
24+
./gradlew jar
25+
```
1026

27+
If you wish to clean your working directory between builds, you can clean it by running:
1128
```
12-
auth_param basic program /usr/local/Cellar/squid/3.5.6/libexec/basic_ncsa_auth <SQUID_DIR>/passwords
13-
auth_param basic realm proxy
14-
acl authenticated proxy_auth REQUIRED
15-
http_access allow authenticated
16-
# And finally deny all other access to this proxy
17-
http_access deny all
29+
./gradlew clean
1830
```
1931

20-
The contents of the passwords file is:
32+
If you wish to use your generated SDK artifact by another Maven/Gradle project such as [hello-java](https://github.com/launchdarkly/hello-java), you will likely want to publish the artifact to your local Maven repository so that your other project can access it.
2133
```
22-
user:$apr1$sBfNiLFJ$7h3S84EgJhlbWM3v.90v61
34+
./gradlew publishToMavenLocal
2335
```
2436

25-
The username/password is: user/password
37+
### Testing
38+
39+
To build the SDK and run all unit tests:
40+
```
41+
./gradlew test
42+
```

README.md

+19-59
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
LaunchDarkly SDK for Java
1+
LaunchDarkly Server-side SDK for Java
22
=========================
33

44
[![Circle CI](https://circleci.com/gh/launchdarkly/java-server-sdk.svg?style=shield)](https://circleci.com/gh/launchdarkly/java-server-sdk)
5-
[![Javadocs](http://javadoc.io/badge/com.launchdarkly/launchdarkly-client.svg)](http://javadoc.io/doc/com.launchdarkly/launchdarkly-client)
5+
[![Javadocs](http://javadoc.io/badge/com.launchdarkly/launchdarkly-java-server-sdk.svg)](http://javadoc.io/doc/com.launchdarkly/launchdarkly-java-server-sdk)
6+
7+
LaunchDarkly overview
8+
-------------------------
9+
[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!
10+
11+
[![Twitter Follow](https://img.shields.io/twitter/follow/launchdarkly.svg?style=social&label=Follow&maxAge=2592000)](https://twitter.com/intent/follow?screen_name=launchdarkly)
612

713
Supported Java versions
814
-----------------------
@@ -14,47 +20,14 @@ Distributions
1420

1521
Three variants of the SDK jar are published to Maven:
1622

17-
* The default uberjar - the dependency that is shown below under "Quick setup". This contains the SDK classes, and all of the SDK's dependencies except for Gson and SLF4J, which must be provided by the host application. The bundled dependencies have shaded package names (and are not exported in OSGi), so they will not interfere with any other versions of the same packages.
23+
* The default uberjar - this is accessible as `com.launchdarkly:launchdarkly-java-server-sdk:jar` and is the dependency used in the "[Getting started](https://docs.launchdarkly.com/docs/java-sdk-reference#section-getting-started)" section of the SDK reference guide as well as in the [`hello-java`](https://github.com/launchdarkly/hello-java) sample app. This variant contains the SDK classes, and all of the SDK's dependencies except for Gson and SLF4J, which must be provided by the host application. The bundled dependencies have shaded package names (and are not exported in OSGi), so they will not interfere with any other versions of the same packages.
1824
* The extended uberjar - add `<classifier>all</classifier>` in Maven, or `:all` in Gradle. This is the same as the default uberjar except that Gson and SLF4J are also bundled, without shading (and are exported in OSGi).
1925
* The "thin" jar - add `<classifier>thin</classifier>` in Maven, or `:thin` in Gradle. This contains _only_ the SDK classes.
2026

21-
Quick setup
27+
Getting started
2228
-----------
2329

24-
0. Add the Java SDK to your project
25-
26-
<!-- in Maven: -->
27-
<dependency>
28-
<groupId>com.launchdarkly</groupId>
29-
<artifactId>launchdarkly-client</artifactId>
30-
<version>4.6.3</version>
31-
</dependency>
32-
33-
// or in Gradle:
34-
"com.launchdarkly:launchdarkly-client:4.6.3"
35-
36-
1. Import the LaunchDarkly package:
37-
38-
import com.launchdarkly.client.*;
39-
40-
2. Create a new LDClient with your SDK key:
41-
42-
LDClient ldClient = new LDClient("YOUR_SDK_KEY");
43-
44-
Your first feature flag
45-
-----------------------
46-
47-
1. Create a new feature flag on your [dashboard](https://app.launchdarkly.com)
48-
2. In your application code, use the feature's key to check wthether the flag is on for each user:
49-
50-
LDUser user = new LDUser(username);
51-
boolean showFeature = ldClient.boolVariation("your.feature.key", user, false);
52-
if (showFeature) {
53-
// application code to show the feature
54-
}
55-
else {
56-
// the code to run if the feature is off
57-
}
30+
Refer to the [SDK reference guide](https://docs.launchdarkly.com/docs/java-sdk-reference#section-getting-started) for instructions on getting started with using the SDK.
5831

5932
Logging
6033
-------
@@ -68,7 +41,7 @@ Be aware of two considerations when enabling the DEBUG log level:
6841
Using flag data from a file
6942
---------------------------
7043

71-
For testing purposes, the SDK can be made to read feature flag state from a file or files instead of connecting to LaunchDarkly. See <a href="http://javadoc.io/page/com.launchdarkly/launchdarkly-client/latest/com/launchdarkly/client/files/FileComponents.html">FileComponents</a> for more details.
44+
For testing purposes, the SDK can be made to read feature flag state from a file or files instead of connecting to LaunchDarkly. See <a href="http://javadoc.io/page/com.launchdarkly/launchdarkly-java-server-sdk/latest/com/launchdarkly/client/files/FileComponents.html">FileComponents</a> for more details.
7245

7346
DNS caching issues
7447
------------------
@@ -80,18 +53,17 @@ Unlike some other languages, in Java the DNS caching behavior is controlled by t
8053
Learn more
8154
----------
8255

83-
Check out our [documentation](http://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](http://docs.launchdarkly.com/docs/java-sdk-reference) or our [Javadocs](http://launchdarkly.github.io/java-server-sdk/).
56+
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/docs/java-sdk-reference) or our [code-generated API documentation](https://launchdarkly.github.io/java-server-sdk/).
8457

8558
Testing
8659
-------
8760

8861
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.
8962

90-
9163
Contributing
9264
------------
9365

94-
We encourage pull-requests and other contributions from the community. We've also published an [SDK contributor's guide](http://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work.
66+
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.
9567

9668
About LaunchDarkly
9769
-----------
@@ -101,22 +73,10 @@ About LaunchDarkly
10173
* 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?).
10274
* 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.
10375
* 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.
104-
* LaunchDarkly provides feature flag SDKs for
105-
* [Java](http://docs.launchdarkly.com/docs/java-sdk-reference "Java SDK")
106-
* [JavaScript](http://docs.launchdarkly.com/docs/js-sdk-reference "LaunchDarkly JavaScript SDK")
107-
* [PHP](http://docs.launchdarkly.com/docs/php-sdk-reference "LaunchDarkly PHP SDK")
108-
* [Python](http://docs.launchdarkly.com/docs/python-sdk-reference "LaunchDarkly Python SDK")
109-
* [Go](http://docs.launchdarkly.com/docs/go-sdk-reference "LaunchDarkly Go SDK")
110-
* [Node.JS](http://docs.launchdarkly.com/docs/node-sdk-reference "LaunchDarkly Node SDK")
111-
* [Electron](http://docs.launchdarkly.com/docs/electron-sdk-reference "LaunchDarkly Electron SDK")
112-
* [.NET](http://docs.launchdarkly.com/docs/dotnet-sdk-reference "LaunchDarkly .Net SDK")
113-
* [Ruby](http://docs.launchdarkly.com/docs/ruby-sdk-reference "LaunchDarkly Ruby SDK")
114-
* [iOS](http://docs.launchdarkly.com/docs/ios-sdk-reference "LaunchDarkly iOS SDK")
115-
* [Android](http://docs.launchdarkly.com/docs/android-sdk-reference "LaunchDarkly Android SDK")
76+
* 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.
11677
* Explore LaunchDarkly
117-
* [launchdarkly.com](http://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
118-
* [docs.launchdarkly.com](http://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDKs
119-
* [apidocs.launchdarkly.com](http://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
120-
* [blog.launchdarkly.com](http://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
78+
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
79+
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
80+
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
81+
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
12182
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies
122-

0 commit comments

Comments
 (0)