Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
467 commits
Select commit Hold shift + click to select a range
c84852d
Merge commit '4791702a70d4d70b8dcab4283131aa09652fa998'
eli-darkly Mar 13, 2019
f48fcaf
bump eventsource version so we're no longer getting JSR305 annotations
eli-darkly Mar 21, 2019
5f75259
remove special shading rule for javax annotations
eli-darkly Mar 21, 2019
cd1f8d8
Merge pull request #120 from launchdarkly/eb/ch34379/no-jsr305
eli-darkly Mar 21, 2019
d769aa4
merge from public after release
LaunchDarklyCI Mar 22, 2019
ebc6099
Removed .fossa.yml, removed fossa job from circleci, removed fossa ba…
torchhound Mar 29, 2019
221c10d
extract gradle properties clarification to separate PR
bwoskow-ld Apr 1, 2019
c0d7e5f
Merge pull request #123 from launchdarkly/bw/ch35262/gradle-propertie…
bwoskow-ld Apr 1, 2019
69ee4ed
Merge pull request #122 from launchdarkly/jc/remove-fossa
torchhound Apr 1, 2019
1e17dad
add optional metric value to track()
eli-darkly Apr 13, 2019
5a0313b
add test
eli-darkly Apr 13, 2019
855e8c0
update method description
eli-darkly Apr 16, 2019
be2f93a
Merge pull request #124 from launchdarkly/eb/ch32302/metric-value
eli-darkly Apr 16, 2019
bbe805b
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld Apr 26, 2019
157a709
artifact/repository rename + doc update (#125)
bwoskow-ld May 1, 2019
20573f6
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld May 1, 2019
345506d
merge from public after release
LaunchDarklyCI May 1, 2019
786e432
Adding properties back to fix the latest failure in the java restwrap…
bwoskow-ld May 2, 2019
3a8fdf6
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld May 2, 2019
139f083
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld May 3, 2019
d5cca57
change mirror used to get felix (#127)
bwoskow-ld May 21, 2019
8c7cb63
Add circleci jobs for supported java versions (#128)
bwoskow-ld May 21, 2019
2cd6c19
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld May 21, 2019
d7a7dae
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld May 21, 2019
ad3de4c
merge from public after release
LaunchDarklyCI May 21, 2019
bb188bd
rename inputChannel and buffer to inbox and outbox
eli-darkly Jul 8, 2019
822dbaa
drop events if inbox is full
eli-darkly Jul 8, 2019
0af23e5
revert unintentional change
eli-darkly Jul 8, 2019
8c689d6
use a volatile boolean instead of an AtomicBoolean
eli-darkly Jul 8, 2019
d2f52f9
comment
eli-darkly Jul 8, 2019
50ae974
Merge pull request #129 from launchdarkly/eb/ch32404/full-event-inbox
eli-darkly Jul 10, 2019
d2b8e94
merge from public after release
LaunchDarklyCI Jul 10, 2019
633f45d
Merge branch 'master' into experiment
eli-darkly Jul 10, 2019
275d472
[ch39684] Diagnostic events (#130)
gwhelanLD Jul 25, 2019
d7f1724
deprecate samplingInterval
eli-darkly Aug 1, 2019
da03425
add password to Redis builder
eli-darkly Aug 1, 2019
b90ea52
Merge pull request #131 from launchdarkly/eb/ch38635/deprecate-sampling
eli-darkly Aug 1, 2019
fd5dcda
Merge branch 'master' of github.com:launchdarkly/java-client
eli-darkly Aug 1, 2019
1a8f40f
add polling mode tests and end-to-end streaming test
eli-darkly Aug 2, 2019
e70355a
revise custom TLS config implementation, add tests
eli-darkly Aug 2, 2019
b9aa701
rm test code
eli-darkly Aug 2, 2019
a6209c0
rm unused
eli-darkly Aug 2, 2019
7cddd94
change test cert properties for Azure compatibility
eli-darkly Aug 2, 2019
37c456e
Merge pull request #132 from launchdarkly/eb/ch45321/polling-tests
eli-darkly Aug 2, 2019
2ebf254
Merge pull request #133 from launchdarkly/eb/ch44325/tls-config
eli-darkly Aug 2, 2019
03a4dc2
Merge branch 'master' into eb/ch41263/redis-password
eli-darkly Aug 2, 2019
b4f9054
add Redis builder options for password, TLS, database
eli-darkly Aug 2, 2019
450868e
revert debugging changes
eli-darkly Aug 2, 2019
f59392c
Merge pull request #134 from launchdarkly/eb/ch41263/redis-password
eli-darkly Aug 2, 2019
0ffa58f
Merge branch 'master' of github.com:launchdarkly/java-client
eli-darkly Aug 3, 2019
facd40a
Merge branch 'master' into experiment
eli-darkly Aug 19, 2019
1bce52e
update doc comment for track() with metric
eli-darkly Aug 19, 2019
52868d2
inline doc link
eli-darkly Aug 19, 2019
d47af12
avoid concurrency problem with date parser for event responses
eli-darkly Aug 19, 2019
9e5606c
Merge pull request #135 from launchdarkly/eb/ch32302/track-comment
eli-darkly Aug 19, 2019
cdb18be
revert accidental deletion, fix test
eli-darkly Aug 19, 2019
6bdf490
Merge pull request #136 from launchdarkly/eb/ch46731/events-parse-error
eli-darkly Aug 19, 2019
c80e585
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Aug 19, 2019
4789513
typo
eli-darkly Aug 19, 2019
43e2d2b
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Aug 19, 2019
8c678e5
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Aug 19, 2019
06b2390
merge from public after release
LaunchDarklyCI Aug 19, 2019
ff2890d
Merge branch 'master' into experiment
eli-darkly Aug 20, 2019
87da949
add tests and doc comments about float->int rounding
eli-darkly Sep 6, 2019
71970ae
Merge pull request #137 from launchdarkly/eb/ch48416/rounding
eli-darkly Sep 9, 2019
c18bc85
Merge branch 'master' into experiment
eli-darkly Sep 19, 2019
db30229
Revert "Revert "Merge pull request #116 from launchdarkly/eb/ch32302/…
eli-darkly Sep 27, 2019
8f4b7e0
merge from public after release
LaunchDarklyCI Sep 28, 2019
ab96d0f
add LDValue type and deprecate use of JsonElement
eli-darkly Sep 28, 2019
2ee0b8b
add type converters
eli-darkly Sep 28, 2019
ca124b4
add convenience method
eli-darkly Sep 28, 2019
64b9696
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Sep 30, 2019
af8a4a0
support long integers
eli-darkly Oct 3, 2019
c44ae91
javadoc fixes
eli-darkly Oct 3, 2019
bb5316f
simplify EvaluationDetail
eli-darkly Oct 3, 2019
0367d07
fail if test jar download fails
eli-darkly Oct 3, 2019
da4dde5
fix broken test job - jar URLs are now returning redirects
eli-darkly Oct 3, 2019
24d2831
Merge branch 'master' into eb/ch49042/value-type
eli-darkly Oct 3, 2019
41d52f0
indent
eli-darkly Oct 7, 2019
c1c6c32
Merge pull request #138 from launchdarkly/eb/ch49042/value-type
eli-darkly Oct 7, 2019
745633c
add missing @Deprecated
eli-darkly Oct 7, 2019
a6d1877
add package comments
eli-darkly Oct 7, 2019
ed5e554
Merge pull request #139 from launchdarkly/eb/package-info
eli-darkly Oct 7, 2019
b70ab0f
restore previously existing track() overload
eli-darkly Oct 7, 2019
50e0eb6
add @Deprecated
eli-darkly Oct 8, 2019
70fdb42
Merge pull request #140 from launchdarkly/eb/ch49042/track-ldvalue-me…
eli-darkly Oct 8, 2019
ab4cfea
add packaging test for NewRelic reflection
eli-darkly Oct 15, 2019
4ccd699
fix NewRelic reflection logic to avoid shading
eli-darkly Oct 15, 2019
241d6fd
Merge pull request #141 from launchdarkly/eb/ch57521/newrelic-class
eli-darkly Oct 15, 2019
014100a
fix NewRelic reflection logic to avoid shading
eli-darkly Oct 16, 2019
bd7cfef
apply proxy settings to stream, and manage HTTP clients better
eli-darkly Oct 16, 2019
69beb67
better exceptions for null params
eli-darkly Oct 16, 2019
b36f5cc
Merge pull request #143 from launchdarkly/eb/ch52839/npe
eli-darkly Oct 16, 2019
d78e1df
Merge pull request #142 from launchdarkly/eb/ch45333-ch52886/http-cli…
eli-darkly Oct 16, 2019
ff6866c
add null guard
eli-darkly Oct 17, 2019
442c1b1
test that would have caught lack of null guard
eli-darkly Oct 17, 2019
d0d67e6
Merge branch '4.8.x' of github.com:launchdarkly/java-server-sdk into …
eli-darkly Oct 17, 2019
2d30432
Merge branch '4.8.x'
eli-darkly Oct 17, 2019
9e1602d
merge from public after release
LaunchDarklyCI Oct 18, 2019
ccaf520
don't use intermediate objects and reflection when encoding events to…
eli-darkly Oct 25, 2019
90a66ef
fix filtering of duplicate flag keys, update test to be more sensitive
eli-darkly Oct 25, 2019
fdf8ea6
Merge pull request #144 from launchdarkly/eb/ch53906/stream-json-events
eli-darkly Oct 25, 2019
2f4e781
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
bwoskow-ld Nov 7, 2019
f54bca1
Merge branch 'master' into diag-events
eli-darkly Nov 12, 2019
f875a1b
add convenience methods to ArrayBuilder, ObjectBuilder
eli-darkly Nov 12, 2019
f297836
add tests for LDValue equality & hash code
eli-darkly Nov 12, 2019
5b6fd8e
Merge pull request #145 from launchdarkly/eb/ch56503/ldvalue-tests-an…
eli-darkly Nov 18, 2019
d83ea62
[ch56386] Update baseurl diagnostic fields to be booleans in Java SDK…
gwhelanLD Nov 19, 2019
4af952f
fix NPE when serializing a user that wasn't created through the builder
eli-darkly Nov 20, 2019
6078514
normalize properties in constructor, add unit test
eli-darkly Nov 20, 2019
3065d33
Temporary revert of ch56503 new features, to allow patch release for …
eli-darkly Nov 20, 2019
1f4f640
Merge pull request #147 from launchdarkly/eb/ch56738/user-encoding-npe
eli-darkly Nov 20, 2019
6b40762
fix bug in summary event format and add test coverage (#148)
eli-darkly Nov 21, 2019
28d1df8
merge from public after release
LaunchDarklyCI Nov 21, 2019
4d035f8
Revert "Temporary revert of ch56503 new features, to allow patch rele…
eli-darkly Nov 21, 2019
225fdf0
Merge branch 'master' into diag-events
eli-darkly Nov 21, 2019
72e91e7
[ch56562] More consistency with .NET and fix flaky tests. (#149)
gwhelanLD Nov 22, 2019
d553206
Diagnostic stream inits. (#151)
gwhelanLD Nov 22, 2019
e243cd0
[ch57100] Deprecate LDCountryCode and LDUser.Builder methods with LDC…
gwhelanLD Dec 6, 2019
5d9c5dc
Merge branch 'master' into diag-events
gwhelanLD Dec 9, 2019
3a800a8
use CircleCI for Windows build (#154)
eli-darkly Dec 10, 2019
16aaf85
fail build on javadoc mistakes/omissions; deprecate some internal stu…
eli-darkly Dec 11, 2019
7d41d9e
use precomputed EvaluationReason instances instead of creating new on…
eli-darkly Dec 11, 2019
57cd9c8
[ch57885] Events in last batch (#158)
gwhelanLD Dec 13, 2019
480d886
don't let user fall outside of last bucket in rollout
eli-darkly Dec 13, 2019
34819c2
Merge pull request #159 from launchdarkly/eb/ch43307/last-bucket
eli-darkly Dec 13, 2019
91e787c
merge from public after release
LaunchDarklyCI Dec 13, 2019
ec55de6
Merge branch 'master' into diag-events
eli-darkly Dec 17, 2019
7e732d6
add unit tests for basic bucketing logic
eli-darkly Dec 30, 2019
173f411
Merge pull request #163 from launchdarkly/eb/ch43307/test-bucketing
eli-darkly Dec 30, 2019
103aea3
start renaming FeatureStore & UpdateProcessor to DataStore & DataSource
eli-darkly Jan 4, 2020
93f9b4e
move Redis and FileData stuff into new integrations subpackage
eli-darkly Jan 4, 2020
7884220
deprecation
eli-darkly Jan 4, 2020
7c9edc2
javadoc formatting
eli-darkly Jan 4, 2020
150ec1e
hack pom to fix dependency scopes
eli-darkly Jan 6, 2020
fa5fa9d
upgrade Shadow plugin
eli-darkly Jan 6, 2020
942b110
Merge pull request #166 from launchdarkly/eb/ch28692/pom-scope
eli-darkly Jan 6, 2020
c754fdf
don't need fully qualified class name
eli-darkly Jan 6, 2020
fe01ac7
merge from public after release
LaunchDarklyCI Jan 7, 2020
7d35290
typo
eli-darkly Jan 7, 2020
c273a05
Merge pull request #164 from launchdarkly/eb/ch59598/intf-names-4.x
eli-darkly Jan 7, 2020
9cd5228
Merge pull request #165 from launchdarkly/eb/ch59586/integrations-pac…
eli-darkly Jan 7, 2020
68193f8
allow infinite cache TTL
eli-darkly Jan 7, 2020
526939c
fix test
eli-darkly Jan 7, 2020
a3a7b7a
Merge pull request #167 from launchdarkly/eb/ch51690/infinite-ttl
eli-darkly Jan 7, 2020
2942a48
fix comment
eli-darkly Jan 7, 2020
314686b
preserve exception in evaluation reason
eli-darkly Jan 13, 2020
8989062
javadoc fix
eli-darkly Jan 13, 2020
138fc89
Merge pull request #170 from launchdarkly/eb/ch61511/exception-in-reason
eli-darkly Jan 14, 2020
f7ba863
implement new DataStore API and fix cache stats logic
eli-darkly Jan 14, 2020
ce4a764
misc fixes
eli-darkly Jan 14, 2020
16201e9
remove some unnecessary 4.x-style methods from new types
eli-darkly Jan 14, 2020
d00065d
add package info
eli-darkly Jan 14, 2020
f2d54da
deprecation
eli-darkly Jan 14, 2020
bf75d5c
misc cleanup
eli-darkly Jan 14, 2020
81c937f
misc cleanup
eli-darkly Jan 14, 2020
3063731
Add X-LaunchDarkly-Payload-ID header on event post. (#169)
gwhelanLD Jan 14, 2020
d5c85c5
fix comment
eli-darkly Jan 15, 2020
1cf368a
comment fixes
eli-darkly Jan 15, 2020
ff734ad
avoid exception with semver operators and non-strings
eli-darkly Jan 17, 2020
18b93f7
don't include exception in error reason JSON rep
eli-darkly Jan 17, 2020
d8a379c
Merge pull request #172 from launchdarkly/eb/ch44115/semver-non-string
eli-darkly Jan 17, 2020
7c7d2dd
Merge pull request #173 from launchdarkly/eb/ch61949/exception-json
eli-darkly Jan 17, 2020
2567c8a
Revert "Merge pull request #167 from launchdarkly/eb/ch51690/infinite…
eli-darkly Jan 17, 2020
6b9f689
Revert "Merge pull request #165 from launchdarkly/eb/ch59586/integrat…
eli-darkly Jan 17, 2020
fe364f6
Revert "Merge pull request #164 from launchdarkly/eb/ch59598/intf-nam…
eli-darkly Jan 17, 2020
db8fcf0
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Jan 17, 2020
3123f03
rm inapplicable comment
eli-darkly Jan 17, 2020
5413c80
merge from public after release
LaunchDarklyCI Jan 17, 2020
c899d52
Revert "Revert "Merge pull request #167 from launchdarkly/eb/ch51690/…
eli-darkly Jan 17, 2020
3bd558f
fix comments
eli-darkly Jan 17, 2020
3d5381f
fix merge error
eli-darkly Jan 17, 2020
aa41dd2
Merge branch 'master' into eb/ch59777-ch61549/new-persistent-store-in…
eli-darkly Jan 17, 2020
bf3d546
Merge branch 'master' into diag-events
eli-darkly Jan 18, 2020
c0c6a33
normalize OS name in diagnostic data
eli-darkly Jan 18, 2020
1be8eeb
Merge pull request #178 from launchdarkly/eb/ch62088/diag-os-name
eli-darkly Jan 18, 2020
38f48d7
Merge pull request #171 from launchdarkly/eb/ch59777-ch61549/new-pers…
eli-darkly Jan 22, 2020
1f15835
(4.x) add component-scoped configuration for polling and streaming
eli-darkly Jan 22, 2020
205496d
update package comment
eli-darkly Jan 22, 2020
be9a7fd
javadoc fixes
eli-darkly Jan 22, 2020
0b915b2
javadoc fixes
eli-darkly Jan 22, 2020
ffce8a4
misc cleanup
eli-darkly Jan 22, 2020
73f07b1
misc cleanup
eli-darkly Jan 22, 2020
adeb7a8
rename deprecated LDConfig fields to make it obvious when we're using…
eli-darkly Jan 22, 2020
a1e6f58
comment
eli-darkly Jan 22, 2020
29c8ea3
fix deprecated property reference
eli-darkly Jan 22, 2020
774f328
javadoc fix
eli-darkly Jan 22, 2020
e43b4b0
fix example code
eli-darkly Jan 22, 2020
22b1de5
(4.x) add component-scoped configuration for events
eli-darkly Jan 22, 2020
85d0c7a
doc comment copyedit
eli-darkly Jan 22, 2020
53f377f
misc cleanup
eli-darkly Jan 22, 2020
b87ce53
better comment
eli-darkly Jan 23, 2020
791e236
Merge branch 'master' into diag-events
eli-darkly Jan 23, 2020
38c57ec
new dataStoreType behavior in diagnostic events
eli-darkly Jan 23, 2020
0d90539
consistent verbiage
eli-darkly Jan 23, 2020
a8c4c02
Copyedit
eli-darkly Jan 23, 2020
a8d6a06
Merge pull request #179 from launchdarkly/eb/ch62493/component-config-1
eli-darkly Jan 23, 2020
073b603
Merge branch 'master' into diag-events
eli-darkly Jan 24, 2020
5923008
allow each component to describe its own configuration for diagnostics
eli-darkly Jan 24, 2020
052e22a
Merge branch 'eb/ch62493/component-config-2' into eb/ch62088/event-co…
eli-darkly Jan 27, 2020
5daf1f8
update diagnostic events for new event configuration system
eli-darkly Jan 27, 2020
38fc128
@see doc links
eli-darkly Jan 28, 2020
8a0751d
rm unused
eli-darkly Jan 28, 2020
7216089
Merge pull request #180 from launchdarkly/eb/ch62493/component-config-2
eli-darkly Jan 28, 2020
f43a473
Merge branch 'master' into diag-events
eli-darkly Jan 28, 2020
c9482c5
Merge branch 'diag-events' into eb/ch62088/store-type-desc
eli-darkly Jan 28, 2020
159a81a
Merge branch 'eb/ch62088/store-type-desc' into eb/ch62088/event-confi…
eli-darkly Jan 28, 2020
067eb74
Merge pull request #181 from launchdarkly/eb/ch62088/store-type-desc
eli-darkly Jan 28, 2020
c4f65d3
Merge pull request #182 from launchdarkly/eb/ch62088/event-config-desc
eli-darkly Jan 28, 2020
67175d3
misc cleanup in new APIs
eli-darkly Jan 28, 2020
087ceca
fix generation of CA certs for TLS tests
eli-darkly Jan 28, 2020
25df733
javadoc
eli-darkly Jan 29, 2020
013733c
Merge pull request #184 from launchdarkly/eb/ch63081/tls-tests
eli-darkly Jan 29, 2020
6b089a8
Merge branch 'master' into eb/ch62493/cleanup
eli-darkly Jan 29, 2020
0f6fdd5
Merge pull request #183 from launchdarkly/eb/ch62493/cleanup
eli-darkly Jan 29, 2020
e4c77db
fix setting Redis URI
eli-darkly Jan 29, 2020
0b87054
better data store tests using fake data model
eli-darkly Jan 29, 2020
617cd48
add test for unwanted constant munging
eli-darkly Jan 29, 2020
8ff4452
compute default Redis URL to avoid munging of string literals
eli-darkly Jan 29, 2020
103a6b0
Merge pull request #186 from launchdarkly/eb/ch63321/redis-default
eli-darkly Jan 29, 2020
e576827
Merge pull request #185 from launchdarkly/eb/ch59777/redis-builder
eli-darkly Jan 29, 2020
b670c79
fix deprecated config logic so samplingInterval is preserved
eli-darkly Jan 30, 2020
a2159ea
add tests to verify the config options that are actually passed to th…
eli-darkly Jan 30, 2020
d68208d
deprecations
eli-darkly Jan 30, 2020
5b34c94
Merge pull request #187 from launchdarkly/eb/ch62088/config-and-test-…
eli-darkly Jan 30, 2020
fba97c3
merge from public after release
LaunchDarklyCI Jan 30, 2020
2025af6
attempt to fix releases
eli-darkly Jan 31, 2020
23080ee
Merge pull request #188 from launchdarkly/eb/ch63665/fix-release
eli-darkly Jan 31, 2020
b6d7e60
use Set instead of List for user targets
eli-darkly Mar 9, 2020
a05df4b
use contains() instead of iterating
eli-darkly Mar 9, 2020
a4aace1
Merge pull request #197 from launchdarkly/eb/ch68261/target-set
eli-darkly Mar 9, 2020
334a68d
change in-memory store to use an immutable map and lockless reads
eli-darkly Mar 9, 2020
02d9922
null guard in upsert
eli-darkly Mar 9, 2020
84a8f33
Merge pull request #198 from launchdarkly/eb/ch68450/lockless-store-r…
eli-darkly Mar 12, 2020
d0e9433
update okhttp-eventsource version (for okhttp update) (#201)
eli-darkly Mar 20, 2020
4a66e67
merge from public after release
LaunchDarklyCI Mar 20, 2020
f687e19
update build to use Gradle 6
eli-darkly Apr 6, 2020
c8f992c
fix packaging tests
eli-darkly Apr 7, 2020
a38c9d5
better target order
eli-darkly Apr 7, 2020
83eaa5d
comments
eli-darkly Apr 7, 2020
c69dc76
rm unnecessary Gogo CLI bundles
eli-darkly Apr 7, 2020
1b8c82c
Merge pull request #202 from launchdarkly/eb/ch76427/gradle-6
eli-darkly Apr 7, 2020
9aef9cb
(4.x) restart stream if we get bad data or a store error (#206)
eli-darkly Apr 10, 2020
c380143
add scoped configuration for HTTP options
eli-darkly Apr 16, 2020
e076f77
deprecated methods with an annotation, not just with javadoc
eli-darkly Apr 17, 2020
ae0a53a
add getters for all properties on EvaluationReason; deprecate subclasses
eli-darkly Apr 20, 2020
93d4aa2
Merge pull request #210 from launchdarkly/eb/ch74282/reason-subclasses
eli-darkly Apr 20, 2020
868ef25
Merge pull request #208 from launchdarkly/eb/ch73875/http-config
eli-darkly Apr 21, 2020
1ee6277
don't log exception stacktraces except at debug level
eli-darkly Apr 21, 2020
a7e97b9
Merge pull request #211 from launchdarkly/eb/ch71166/debug-stacktrace
eli-darkly Apr 21, 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
53 changes: 30 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ plugins {
id "java-library"
id "checkstyle"
id "signing"
id "com.github.johnrengelman.shadow" version "4.0.4"
id "com.github.johnrengelman.shadow" version "5.2.0"
id "maven-publish"
id "de.marcphilipp.nexus-publish" version "0.3.0"
id "io.codearte.nexus-staging" version "0.21.2"
Expand All @@ -38,13 +38,13 @@ configurations.all {
allprojects {
group = 'com.launchdarkly'
version = "${version}"
archivesBaseName = 'launchdarkly-java-server-sdk'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}

ext {
sdkBasePackage = "com.launchdarkly.client"
sdkBaseName = "launchdarkly-java-server-sdk"

// List any packages here that should be included in OSGi imports for the SDK, if they cannot
// be discovered by looking in our explicit dependencies.
Expand All @@ -53,23 +53,34 @@ ext {

ext.libraries = [:]

ext.versions = [
"commonsCodec": "1.10",
"gson": "2.7",
"guava": "19.0",
"jodaTime": "2.9.3",
"okhttpEventsource": "1.11.0",
"slf4j": "1.7.21",
"snakeyaml": "1.19",
"jedis": "2.9.0"
]

// Add dependencies to "libraries.internal" that are not exposed in our public API. These
// will be completely omitted from the "thin" jar, and will be embedded with shaded names
// in the other two SDK jars.
libraries.internal = [
"commons-codec:commons-codec:1.10",
"com.google.guava:guava:19.0",
"joda-time:joda-time:2.9.3",
"com.launchdarkly:okhttp-eventsource:1.10.2",
"org.yaml:snakeyaml:1.19",
"redis.clients:jedis:2.9.0"
"commons-codec:commons-codec:${versions.commonsCodec}",
"com.google.guava:guava:${versions.guava}",
"joda-time:joda-time:${versions.jodaTime}",
"com.launchdarkly:okhttp-eventsource:${versions.okhttpEventsource}",
"org.yaml:snakeyaml:${versions.snakeyaml}",
"redis.clients:jedis:${versions.jedis}"
]

// Add dependencies to "libraries.external" that are exposed in our public API, or that have
// global state that must be shared between the SDK and the caller.
libraries.external = [
"com.google.code.gson:gson:2.7",
"org.slf4j:slf4j-api:1.7.21"
"com.google.code.gson:gson:${versions.gson}",
"org.slf4j:slf4j-api:${versions.slf4j}"
]

// Add dependencies to "libraries.test" that are used only in unit tests.
Expand All @@ -84,25 +95,26 @@ libraries.test = [

dependencies {
implementation libraries.internal
compileClasspath libraries.external
runtime libraries.internal, libraries.external
api libraries.external
testImplementation libraries.test, libraries.internal, libraries.external

// Unlike what the name might suggest, the "shadow" configuration specifies dependencies that
// should *not* be shaded by the Shadow plugin when we build our shaded jars.
shadow libraries.external
}

task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
configurations {
// We need to define "internal" as a custom configuration that contains the same things as
// "implementation", because "implementation" has special behavior in Gradle that prevents us
// from referencing it the way we do in shadeDependencies().
internal.extendsFrom implementation
}

checkstyle {
configFile file("${project.rootDir}/checkstyle.xml")
}

jar {
baseName = sdkBaseName
// thin classifier means that the non-shaded non-fat jar is still available
// but is opt-in since users will have to specify it.
classifier = 'thin'
Expand All @@ -118,8 +130,6 @@ jar {
// This builds the default uberjar that contains all of our dependencies except Gson and
// SLF4j, in shaded form. The user is expected to provide Gson and SLF4j.
shadowJar {
baseName = sdkBaseName

// No classifier means that the shaded jar becomes the default artifact
classifier = ''

Expand All @@ -141,12 +151,11 @@ shadowJar {
// This builds the "-all"/"fat" jar, which is the same as the default uberjar except that
// Gson and SLF4j are bundled and exposed (unshaded).
task shadowJarAll(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
baseName = sdkBaseName
classifier = 'all'
group = "shadow"
description = "Builds a Shaded fat jar including SLF4J"
from(project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output)
configurations = [project.configurations.runtime]
configurations = [project.configurations.runtimeClasspath]
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')

// doFirst causes the following steps to be run during Gradle's execution phase rather than the
Expand Down Expand Up @@ -228,7 +237,7 @@ def shadeDependencies(jarTask) {
def excludePackages = getAllSdkPackages() +
configurations.shadow.collectMany { getPackagesInDependencyJar(it)}
def topLevelPackages =
configurations.runtime.collectMany {
configurations.internal.collectMany {
getPackagesInDependencyJar(it).collect { it.contains(".") ? it.substring(0, it.indexOf(".")) : it }
}.
unique()
Expand Down Expand Up @@ -325,7 +334,6 @@ test {
idea {
module {
downloadJavadoc = true

downloadSources = true
}
}
Expand Down Expand Up @@ -367,7 +375,6 @@ publishing {
shadow(MavenPublication) { publication ->
project.shadow.component(publication)

artifactId = sdkBaseName
artifact jar
artifact sourcesJar
artifact javadocJar
Expand Down Expand Up @@ -422,7 +429,7 @@ tasks.withType(Sign) {
// dependencies of the SDK, so they can be put on the classpath as needed during tests.
task exportDependencies(type: Copy, dependsOn: compileJava) {
into "packaging-test/temp/dependencies-all"
from configurations.runtime.resolvedConfiguration.resolvedArtifacts.collect { it.file }
from configurations.runtimeClasspath.resolvedConfiguration.resolvedArtifacts.collect { it.file }
}

gitPublish {
Expand Down
5 changes: 4 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
version=4.12.1
version=4.12.2
# The following empty ossrh properties are used by LaunchDarkly's internal integration testing framework
# and should not be needed for typical development purposes (including by third-party developers).
ossrhUsername=
ossrhPassword=

# See https://github.com/gradle/gradle/issues/11308 regarding the following property
systemProp.org.gradle.internal.publish.checksums.insecure=true
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
65 changes: 28 additions & 37 deletions packaging-test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,31 @@ SDK_DEFAULT_JAR=$(SDK_JARS_DIR)/launchdarkly-java-server-sdk-$(SDK_VERSION).jar
SDK_ALL_JAR=$(SDK_JARS_DIR)/launchdarkly-java-server-sdk-$(SDK_VERSION)-all.jar
SDK_THIN_JAR=$(SDK_JARS_DIR)/launchdarkly-java-server-sdk-$(SDK_VERSION)-thin.jar

TEMP_DIR=$(BASE_DIR)/temp
TEMP_OUTPUT=$(TEMP_DIR)/test.out
export TEMP_DIR=$(BASE_DIR)/temp
export TEMP_OUTPUT=$(TEMP_DIR)/test.out

# Build product of the project in ./test-app; can be run as either a regular app or an OSGi bundle
TEST_APP_JAR=$(TEMP_DIR)/test-app.jar

# SLF4j implementation - we need to download this separately because it's not in the SDK dependencies
SLF4J_SIMPLE_JAR=$(TEMP_DIR)/test-slf4j-simple.jar
SLF4J_SIMPLE_JAR_URL=https://oss.sonatype.org/content/groups/public/org/slf4j/slf4j-simple/1.7.21/slf4j-simple-1.7.21.jar

# Felix OSGi container
FELIX_ARCHIVE=org.apache.felix.main.distribution-6.0.3.tar.gz
FELIX_ARCHIVE_URL=http://mirrors.ibiblio.org/apache//felix/$(FELIX_ARCHIVE)
FELIX_DIR=$(TEMP_DIR)/felix
FELIX_JAR=$(FELIX_DIR)/bin/felix.jar
TEMP_BUNDLE_DIR=$(TEMP_DIR)/bundles
export FELIX_DIR=$(TEMP_DIR)/felix
export FELIX_JAR=$(FELIX_DIR)/lib/felix.jar
export FELIX_BASE_BUNDLE_DIR=$(FELIX_DIR)/base-bundles
export TEMP_BUNDLE_DIR=$(FELIX_DIR)/app-bundles

# Lists of jars to use as a classpath (for the non-OSGi runtime test) or to install as bundles (for
# the OSGi test). Note that we're assuming that all of the SDK's dependencies have built-in support
# for OSGi, which is currently true; if that weren't true, we would have to do something different
# to put them on the system classpath in the OSGi test.
RUN_JARS_test-all-jar=$(TEST_APP_JAR) $(SDK_ALL_JAR) \
$(SLF4J_SIMPLE_JAR)
RUN_JARS_test-all-jar=$(TEST_APP_JAR) $(SDK_ALL_JAR)
RUN_JARS_test-default-jar=$(TEST_APP_JAR) $(SDK_DEFAULT_JAR) \
$(shell ls $(TEMP_DIR)/dependencies-external/*.jar) \
$(SLF4J_SIMPLE_JAR)
$(shell ls $(TEMP_DIR)/dependencies-external/*.jar)
RUN_JARS_test-thin-jar=$(TEST_APP_JAR) $(SDK_THIN_JAR) \
$(shell ls $(TEMP_DIR)/dependencies-internal/*.jar) \
$(shell ls $(TEMP_DIR)/dependencies-external/*.jar) \
$(SLF4J_SIMPLE_JAR)
$(shell ls $(TEMP_DIR)/dependencies-external/*.jar)

# The test-app displays this message on success
SUCCESS_MESSAGE="@@@ successfully created LD client @@@"
export SUCCESS_MESSAGE=@@@ successfully created LD client @@@

classes_prepare=echo " checking $(1)..." && jar tf $(1) | grep '\.class$$' >$(TEMP_OUTPUT)
classes_should_contain=echo " should contain $(2)" && grep $(1) $(TEMP_OUTPUT) >/dev/null
Expand All @@ -73,21 +65,12 @@ clean:
# SECONDEXPANSION is needed so we can use "$@" inside a variable in the prerequisite list of the test targets
.SECONDEXPANSION:

test-all-jar test-default-jar test-thin-jar: $$(RUN_JARS_$$@) $(TEST_APP_JAR) $(FELIX_JAR) get-sdk-dependencies $$@-classes
test-all-jar test-default-jar test-thin-jar: $$@-classes get-sdk-dependencies $$(RUN_JARS_$$@) $(TEST_APP_JAR) $(FELIX_DIR)
@$(call caption,$@)
@echo " non-OSGi runtime test"
@java -classpath $(shell echo "$(RUN_JARS_$@)" | sed -e 's/ /:/g') testapp.TestApp | tee $(TEMP_OUTPUT)
@grep $(SUCCESS_MESSAGE) $(TEMP_OUTPUT) >/dev/null
./run-non-osgi-test.sh $(RUN_JARS_$@)
# Can't currently run the OSGi test for the thin jar, because some of our dependencies aren't available as OSGi bundles.
@if [ "$@" != "test-thin-jar" ]; then \
echo ""; \
echo " OSGi runtime test"; \
rm -rf $(TEMP_BUNDLE_DIR); \
mkdir -p $(TEMP_BUNDLE_DIR); \
cp $(RUN_JARS_$@) $(FELIX_DIR)/bundle/*.jar $(TEMP_BUNDLE_DIR); \
rm -rf $(FELIX_DIR)/felix-cache; \
cd $(FELIX_DIR) && echo "sleep 3;exit 0" | java -jar $(FELIX_JAR) -b $(TEMP_BUNDLE_DIR) | tee $(TEMP_OUTPUT); \
grep $(SUCCESS_MESSAGE) $(TEMP_OUTPUT) >/dev/null; \
./run-osgi-test.sh $(RUN_JARS_$@); \
fi

test-all-jar-classes: $(SDK_ALL_JAR) $(TEMP_DIR)
Expand Down Expand Up @@ -144,13 +127,21 @@ $(TEMP_DIR)/dependencies-internal: $(TEMP_DIR)/dependencies-all
cp $(TEMP_DIR)/dependencies-all/*.jar $@
rm $@/gson*.jar $@/slf4j*.jar

$(SLF4J_SIMPLE_JAR): | $(TEMP_DIR)
curl -f -L $(SLF4J_SIMPLE_JAR_URL) >$@

$(FELIX_JAR): | $(TEMP_DIR)
curl -f -L $(FELIX_ARCHIVE_URL) >$(TEMP_DIR)/$(FELIX_ARCHIVE)
cd $(TEMP_DIR) && tar xfz $(FELIX_ARCHIVE) && rm $(FELIX_ARCHIVE)
cd $(TEMP_DIR) && mv `ls -d felix*` felix
$(FELIX_JAR): $(FELIX_DIR)

$(FELIX_DIR):
mkdir -p $(FELIX_DIR)
mkdir -p $(FELIX_DIR)/lib
mkdir -p $(FELIX_BASE_BUNDLE_DIR)
cd test-app && ../../gradlew createOsgi
@# createOsgi is a target provided by the osgi-run Gradle plugin; it downloads the Felix container and
@# puts it in build/osgi along with related bundles and a config file.
cp -r test-app/build/osgi/conf $(FELIX_DIR)
echo "felix.shutdown.hook=false" >>$(FELIX_DIR)/conf/config.properties
@# setting felix.shutdown.hook to false allows our test app to use System.exit()
cp test-app/build/osgi/system-libs/org.apache.felix.main-*.jar $(FELIX_JAR)
cp test-app/build/osgi/bundle/* $(FELIX_BASE_BUNDLE_DIR)
cd $(FELIX_BASE_BUNDLE_DIR) && rm -f launchdarkly-*.jar gson-*.jar

$(TEMP_DIR):
[ -d $@ ] || mkdir -p $@
6 changes: 6 additions & 0 deletions packaging-test/run-non-osgi-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

echo ""
echo " non-OSGi runtime test"
java -classpath $(echo "$@" | sed -e 's/ /:/g') testapp.TestApp | tee ${TEMP_OUTPUT}
grep "${SUCCESS_MESSAGE}" ${TEMP_OUTPUT} >/dev/null
14 changes: 14 additions & 0 deletions packaging-test/run-osgi-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

echo ""
echo " OSGi runtime test"
rm -rf ${TEMP_BUNDLE_DIR}
mkdir -p ${TEMP_BUNDLE_DIR}
cp $@ ${FELIX_BASE_BUNDLE_DIR}/* ${TEMP_BUNDLE_DIR}
rm -rf ${FELIX_DIR}/felix-cache
rm -f ${TEMP_OUTPUT}
touch ${TEMP_OUTPUT}

cd ${FELIX_DIR} && java -jar ${FELIX_JAR} -b ${TEMP_BUNDLE_DIR} | tee ${TEMP_OUTPUT}

grep "${SUCCESS_MESSAGE}" ${TEMP_OUTPUT} >/dev/null
44 changes: 25 additions & 19 deletions packaging-test/test-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
apply plugin: "java"
apply plugin: "osgi"

buildscript {
repositories {
jcenter()
mavenCentral()
}
}

plugins {
id "java"
id "java-library"
id "biz.aQute.bnd.builder" version "5.0.1"
id "com.athaydes.osgi-run" version "1.6.0"
}

repositories {
mavenCentral()
Expand All @@ -8,32 +20,26 @@ repositories {
allprojects {
group = "com.launchdarkly"
version = "1.0.0"
archivesBaseName = 'test-app-bundle'
sourceCompatibility = 1.7
targetCompatibility = 1.7
}

dependencies {
// Note, the SDK build must have already been run before this, since we're using its product as a dependency
compileClasspath fileTree(dir: "../../build/libs", include: "launchdarkly-java-server-sdk-*-thin.jar")
compileClasspath "com.google.code.gson:gson:2.7"
compileClasspath "org.slf4j:slf4j-api:1.7.21"
compileClasspath "org.osgi:osgi_R4_core:1.0"
implementation fileTree(dir: "../../build/libs", include: "launchdarkly-java-server-sdk-*-thin.jar")
implementation "com.google.code.gson:gson:2.7"
implementation "org.slf4j:slf4j-api:1.7.22"
implementation "org.osgi:osgi_R4_core:1.0"
osgiRuntime "org.slf4j:slf4j-simple:1.7.22"
}

jar {
baseName = 'test-app-bundle'
manifest {
instruction 'Bundle-Activator', 'testapp.TestAppOsgiEntryPoint'
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
bnd(
'Bundle-Activator': 'testapp.TestAppOsgiEntryPoint'
)
}

buildscript {
repositories {
jcenter()
mavenCentral()
}
runOsgi {
bundles = [ ] // we don't need a CLI or anything like that - just the SLF4j dependency shown above
}
1 change: 1 addition & 0 deletions packaging-test/test-app/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'test-app-bundle'
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ public void start(BundleContext context) throws Exception {
System.out.println("@@@ starting test bundle @@@");

TestApp.main(new String[0]);

System.exit(0);
}

public void stop(BundleContext context) throws Exception {
System.out.println("@@@ stopping test bundle @@@");
}
}
Loading