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

prepare 5.10.3 release #283

Merged
merged 1,125 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1125 commits
Select commit Hold shift + click to select a range
4836ea3
fix release metadata
eli-darkly Aug 5, 2020
96e58e7
prepare 4.14.1 release (#200)
LaunchDarklyCI Aug 5, 2020
22149a9
Releasing version 4.14.1
LaunchDarklyCI Aug 5, 2020
2d0d5cd
merge from public after release
LaunchDarklyCI Aug 5, 2020
ef8a801
Merge branch '4.x'
eli-darkly Aug 5, 2020
8825a48
exclude Kotlin metadata from jar + fix misc Gradle problems
eli-darkly Aug 18, 2020
ae46e03
Merge pull request #258 from launchdarkly/eb/ch87032/kotlin-symbols
eli-darkly Aug 18, 2020
b7ce928
merge from public after release
LaunchDarklyCI Aug 19, 2020
b32abc3
update CI and Gradle to test with newer JDKs (#259)
eli-darkly Aug 24, 2020
eefc460
update okhttp to 3.14.9 (fixes incompatibility with OpenJDK 8.0.252)
eli-darkly Aug 31, 2020
87120a4
Merge pull request #260 from launchdarkly/eb/ch88298/okhttp-update-4.x
eli-darkly Sep 1, 2020
0403392
prepare 4.14.2 release (#205)
LaunchDarklyCI Sep 1, 2020
2daeb92
Releasing version 4.14.2
LaunchDarklyCI Sep 1, 2020
7c09c6a
merge from public after release
LaunchDarklyCI Sep 1, 2020
7a9772c
Merge branch '4.x'
eli-darkly Sep 1, 2020
f3f01ec
update okhttp to 4.8.1 (fixes incompatibility with OpenJDK 8.0.252)
eli-darkly Sep 1, 2020
7025ae7
Merge pull request #261 from launchdarkly/eb/ch88298/okhttp-update-5.x
eli-darkly Sep 1, 2020
d1e311e
merge from public after release
LaunchDarklyCI Sep 1, 2020
f5a8555
gitignore
eli-darkly Sep 1, 2020
52c36be
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
gwhelanLD Sep 3, 2020
9fe8f5b
merge from public after release
LaunchDarklyCI Sep 3, 2020
ac9bdb1
Bump SnakeYAML from 1.19 to 1.26 to address CVE-2017-18640
ssrm Sep 3, 2020
d1e0637
Merge pull request #262 from launchdarkly/eb/ch88108/snakeyaml-update
eli-darkly Sep 3, 2020
4f8f980
prepare 4.14.3 release (#209)
LaunchDarklyCI Sep 3, 2020
a6777a8
Releasing version 4.14.3
LaunchDarklyCI Sep 3, 2020
89954b5
merge from public after release
LaunchDarklyCI Sep 3, 2020
a83942e
Merge branch '4.x'
eli-darkly Sep 3, 2020
326e8e1
Merge branch 'master' into eb/ch78216/test-data
eli-darkly Sep 4, 2020
b800f23
comments
eli-darkly Sep 4, 2020
7cb20cd
Merge pull request #251 from launchdarkly/eb/ch78216/test-data
eli-darkly Sep 4, 2020
06fdd3e
only log initialization message once in polling mode
eli-darkly Sep 4, 2020
03e2ad8
Merge pull request #263 from launchdarkly/eb/ch88859/polling-logging
eli-darkly Sep 4, 2020
a448abc
merge from public after release
LaunchDarklyCI Sep 4, 2020
078fe16
[ch89935] Correct some logging call format strings (#264)
gwhelanLD Sep 17, 2020
136eb1b
[ch90109] Remove outdated trackMetric comment from before service sup…
gwhelanLD Sep 18, 2020
889a1c6
Fix compatibility with Java 7.
gwhelanLD Sep 25, 2020
67dea95
Remove import that is no longer used.
gwhelanLD Sep 25, 2020
402b8fe
Merge pull request #266 from launchdarkly/gw/ch90182/fix-java-7-compat
eli-darkly Sep 28, 2020
ee5e212
add Java 7 build (#267)
eli-darkly Sep 28, 2020
cd60e6d
prepare 4.14.4 release (#214)
LaunchDarklyCI Sep 28, 2020
424c7d5
Releasing version 4.14.4
LaunchDarklyCI Sep 28, 2020
72ac981
merge from public after release
LaunchDarklyCI Sep 28, 2020
0113451
add and use getSocketFactory
hroederld Sep 28, 2020
346f655
alignment
hroederld Sep 28, 2020
305f555
add socketFactory to builder
hroederld Sep 28, 2020
7c2eea8
test socket factory builder
hroederld Sep 28, 2020
7f1d8c8
Merge branch '4.x'
eli-darkly Sep 28, 2020
8b51b95
preserve dummy CI config file when pushing to gh-pages (#271)
eli-darkly Sep 30, 2020
f6ae98e
fix concatenation when base URI has a context path (#270)
eli-darkly Oct 1, 2020
b33e5bf
fix shaded jar builds to exclude Jackson classes and not modify Jacks…
eli-darkly Oct 1, 2020
e4ba1cd
merge from public after release
LaunchDarklyCI Oct 1, 2020
18af928
add test httpClientCanUseCustomSocketFactory for DefaultFeatureRequestor
hroederld Oct 7, 2020
fa90fbf
add httpClientCanUseCustomSocketFactory() test for DefaultEventSender…
hroederld Oct 7, 2020
a0b7894
add httpClientCanUseCustomSocketFactory() test to StreamProcessorTest
hroederld Oct 7, 2020
9aeeaaa
merge in master and fix conflict
hroederld Oct 7, 2020
86a601e
pass URI to in customSocketFactory event test
hroederld Oct 9, 2020
ad21f51
[ch90672] Add socketFactory support to SDK
hroederld Oct 9, 2020
8919a07
make test less ambiguous
hroederld Oct 10, 2020
f1808d9
Merge pull request #272 from launchdarkly/hr/ch90672/socketfactory-te…
hroederld Oct 10, 2020
9b20c08
merge from public after release
LaunchDarklyCI Oct 10, 2020
d727737
copy rules to new FlagBuilder instances (#273)
bwoskow-ld Dec 1, 2020
51cb8cf
merge from public after release
LaunchDarklyCI Dec 2, 2020
ace4ad4
Bump guava version (#274)
bwoskow-ld Jan 6, 2021
f86c2c6
merge from public after release
LaunchDarklyCI Jan 15, 2021
88a2e8b
Removed the guides link
bwoskow-ld Feb 3, 2021
9f2ab7b
increment versions when loading file data, so FlagTracker will work (…
eli-darkly Feb 19, 2021
3ba8b90
merge from public after release
LaunchDarklyCI Feb 20, 2021
0d6e3c6
add ability to ignore duplicate keys in file data (#276)
eli-darkly Mar 9, 2021
148dcf1
merge from public after release
LaunchDarklyCI Mar 9, 2021
57e4dd2
add alias events (#278)
apache-hb Apr 5, 2021
89efd68
add validation of javadoc build to CI
eli-darkly Apr 8, 2021
385e79d
update commons-codec to 1.15 (#279)
eli-darkly Apr 8, 2021
aca7716
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Apr 8, 2021
d2b62d1
Merge pull request #280 from launchdarkly/eb/ch105283/check-javadoc
eli-darkly Apr 8, 2021
c53e39c
Add support for experiment rollouts
robertjneal Apr 8, 2021
378b7e3
add tests and use seed for allocating user to partition
robertjneal Apr 9, 2021
c84651c
test serialization and add check for isExperiment
robertjneal Apr 9, 2021
d0e30d2
Merge branch 'master' into rneal/ch101658/add-support-for-experiment-…
robertjneal Apr 14, 2021
b4190ad
fix PollingProcessorTest test race condition + other test issues (#282)
eli-darkly Apr 14, 2021
b26f704
Merge branch 'master' into rneal/ch101658/add-support-for-experiment-…
eli-darkly Apr 14, 2021
fbd6d16
use launchdarkly-java-sdk-common 1.1.0-alpha-expalloc.2
eli-darkly Apr 14, 2021
777b3f3
Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java
robertjneal Apr 14, 2021
99fba91
Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java
robertjneal Apr 14, 2021
2809609
Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java
robertjneal Apr 14, 2021
61ab96d
Update src/test/java/com/launchdarkly/sdk/server/EvaluatorTest.java
robertjneal Apr 14, 2021
d2b53a3
changes per code review comments
robertjneal Apr 15, 2021
4b787a9
Merge branch 'rneal/ch101658/add-support-for-experiment-rollouts' of …
robertjneal Apr 15, 2021
47b9ebb
Please enter the commit message for your changes. Lines starting
robertjneal Apr 15, 2021
3903d54
fix null pointer exception
robertjneal Apr 16, 2021
112f052
address code review comments
robertjneal Apr 19, 2021
4765c66
address more comments
robertjneal Apr 19, 2021
12ee439
missed a ! for isUntracked()
robertjneal Apr 19, 2021
9ed9b2c
fix default boolean for json
robertjneal Apr 19, 2021
d651d26
make untracked FALSE by default
robertjneal Apr 19, 2021
176d7ce
refactoring of bucketing logic to remove the need for an extra result…
eli-darkly Apr 20, 2021
de65f7b
add comment to enum
robertjneal Apr 20, 2021
20e2916
Merge branch 'rneal/ch101658/add-support-for-experiment-rollouts' of …
robertjneal Apr 20, 2021
c05a64a
Merge pull request #281 from launchdarkly/rneal/ch101658/add-support-…
robertjneal Apr 20, 2021
d8c06ec
various JSON fixes, update common-sdk (#284)
eli-darkly Apr 22, 2021
cd8461e
merge from public after release
LaunchDarklyCI Apr 22, 2021
0991ed8
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Apr 23, 2021
95440c7
simlpify the logic and make it match node/.Net sdks
robertjneal Jun 1, 2021
f695931
Merge branch 'master' into exp-alloc
robertjneal Jun 1, 2021
bf3c9c5
Update src/main/java/com/launchdarkly/sdk/server/EventFactory.java
robertjneal Jun 1, 2021
ee1268b
add the same comment as the Node SDK
robertjneal Jun 2, 2021
abb667c
Merge pull request #285 from launchdarkly/rneal/ch107295/simplify-log…
robertjneal Jun 3, 2021
58367e0
Remove outdated/meaningless doc comment. (#286)
gwhelanLD Jun 9, 2021
72c3096
protect against NPEs if flag/segment JSON contains a null value
eli-darkly Jun 10, 2021
44a25fb
Merge pull request #287 from launchdarkly/eb/ch111218/tolerate-nulls
eli-darkly Jun 10, 2021
040909c
merge from public after release
LaunchDarklyCI Jun 11, 2021
c944996
Merge branch 'exp-alloc'
eli-darkly Jun 17, 2021
c5ad21b
use java-sdk-common 1.2.0
eli-darkly Jun 17, 2021
01f642f
fix Jackson-related build issues (again) (#288)
eli-darkly Jun 18, 2021
75322c2
merge from public after release
LaunchDarklyCI Jun 18, 2021
2d6ac72
update to okhttp-eventsource patch for stream retry bug, improve test…
eli-darkly Jun 24, 2021
093a350
merge from public after release
LaunchDarklyCI Jun 25, 2021
4b847a5
add public builder for FeatureFlagsState (#290)
eli-darkly Jun 25, 2021
b66328d
clarify FileData doc comment to say you shouldn't use offline mode (#…
eli-darkly Jun 25, 2021
04b9db7
improve validation of SDK key so we won't throw an exception that con…
eli-darkly Jul 2, 2021
721f757
fix javadoc link in FileData comment (#294)
eli-darkly Jul 2, 2021
2e1b210
fix PollingProcessor 401 behavior and use new HTTP test helpers (#292)
eli-darkly Jul 2, 2021
5de97b5
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Jul 2, 2021
81dd734
merge from public after release
LaunchDarklyCI Jul 2, 2021
eac6da8
re-fix metadata to remove Jackson dependencies, also remove Class-Pat…
eli-darkly Jul 8, 2021
dd7f414
merge from public after release
LaunchDarklyCI Jul 8, 2021
8db8a2d
make FeatureFlagsState.Builder.build() public (#297)
eli-darkly Aug 9, 2021
767e3ac
merge from public after release
Aug 9, 2021
69aef50
clean up tests using java-test-helpers 1.1.0 (#296)
eli-darkly Aug 13, 2021
dda1025
use Releaser v2 config + newer CI images (#298)
eli-darkly Sep 21, 2021
d7358f0
[ch123129] Fix `PollingDataSourceBuilder` example. (#299)
gwhelanLD Sep 24, 2021
f93e43b
Updates docs URLs
ember-stevens Sep 24, 2021
bcbb31b
Merge pull request #300 from launchdarkly/emberstevens/sc-118589/url-…
ember-stevens Sep 27, 2021
ac2fef7
always use US locale when parsing HTTP dates
eli-darkly Oct 12, 2021
4210dc9
Merge pull request #301 from launchdarkly/eb/sc-126069/http-date-locale
eli-darkly Oct 12, 2021
b3b1612
merge from public after release
Oct 12, 2021
b2bd379
use Gson 2.8.9
eli-darkly Nov 30, 2021
239395f
Merge pull request #302 from launchdarkly/eb/sc-132830/gson-version
eli-darkly Nov 30, 2021
b953d6d
merge from public after release
Nov 30, 2021
f34f3a3
don't try to send more diagnostic events after an unrecoverable HTTP …
eli-darkly Dec 7, 2021
c5ca59f
Merge pull request #303 from launchdarkly/eb/sc-133492/diagnostic-401
eli-darkly Dec 8, 2021
f5f4deb
merge from public after release
Dec 8, 2021
5416ac4
Merge branch 'master' of github.com:launchdarkly/java-server-sdk
eli-darkly Dec 8, 2021
c638922
ensure module-info file isn't copied into our jars during build
eli-darkly Jan 7, 2022
c04ad66
Merge pull request #305 from launchdarkly/eb/sc-136330/no-module-file
eli-darkly Jan 7, 2022
56acdd7
merge from public after release
Jan 7, 2022
f07c0e6
use Gradle 7
eli-darkly Jan 8, 2022
6339515
update build for benchmarks
eli-darkly Jan 8, 2022
4119fbc
more Gradle 7 compatibility changes for benchmark job
eli-darkly Jan 8, 2022
3af3fd4
Merge pull request #306 from launchdarkly/eb/sc-122485/gradle7
eli-darkly Jan 10, 2022
5c68abd
test with Java 17 in CI (#307)
eli-darkly Jan 10, 2022
3b60cdb
do date comparisons as absolute times, regardless of time zone (#310)
eli-darkly Jan 25, 2022
401a6c7
fix suppression of nulls in JSON representations (#311)
eli-darkly Jan 28, 2022
a6c79c2
fix identify/track null user key check, also don't create index event…
eli-darkly Jan 28, 2022
aee2487
use latest java-sdk-common
eli-darkly Jan 28, 2022
8f9a5c7
fix setting of trackEvents/trackReason in allFlagsState data when the…
eli-darkly Jan 28, 2022
b428765
Merge pull request #312 from launchdarkly/eb/sc-139100/event-fixes
eli-darkly Jan 28, 2022
5a4fb07
Merge pull request #313 from launchdarkly/eb/sc-137727/all-flag-exper…
eli-darkly Jan 28, 2022
cde4cc4
merge from public after release
Jan 29, 2022
6ff46e7
implement contract tests (#314)
eli-darkly Jan 29, 2022
5673244
Merge Big Segments feature branch for 5.7.0 release (#316)
gwhelanLD Jan 29, 2022
04018ae
merge from public after release
Jan 29, 2022
8a68142
Fix for pom including SDK common library as a dependency. (#317)
gwhelanLD Feb 4, 2022
977253b
merge from public after release
Feb 4, 2022
ee088db
use new logging API
eli-darkly Feb 15, 2022
48ba831
update readme notes about logging
eli-darkly Feb 15, 2022
b5ac0af
set base logger name for SDK per test
eli-darkly Feb 15, 2022
e539ce1
comment
eli-darkly Feb 15, 2022
c514d8e
javadoc fixes
eli-darkly Feb 15, 2022
7233793
revert accidental commit
eli-darkly Feb 15, 2022
75a4c8e
Upload JUnit XML to CircleCI on failure (#320)
aengelberg Apr 13, 2022
7612288
Add application tag support (#319)
aengelberg Apr 18, 2022
1865347
merge from public after release
Apr 18, 2022
ddf8945
Enforce 64 character limit on application tag values (#323)
aengelberg May 3, 2022
e2ac862
fix "wrong type" logic in evaluations when default value is null
eli-darkly May 3, 2022
9bc65b0
Merge pull request #324 from launchdarkly/eb/sc-151896/wrong-type-logic
eli-darkly May 3, 2022
2a71f4b
merge from public after release
May 4, 2022
e21e25a
Merge remote-tracking branch 'public/master'
aengelberg May 12, 2022
c24c950
Rename master to main in .ldrelease/config.yml (#325)
aengelberg May 19, 2022
19f92b0
Simpler way of setting base URIs in Java (#322)
aengelberg May 19, 2022
6483c4b
merge from public after release
May 26, 2022
98b6cd9
Merge branch 'main' into eb/sc-138971/logging
eli-darkly Jun 15, 2022
b617fc4
update logging info in readme
eli-darkly Jun 15, 2022
fe84a21
use 1.0.0 release of logging package
eli-darkly Jun 15, 2022
dce7097
misc cleanup
eli-darkly Jun 15, 2022
7bed7e5
remove unnecessary extra interfaces, just use default methods instead
eli-darkly Jun 15, 2022
6953613
make BigSegmentStoreWrapper.pollingDetectsStaleStatus test less timin…
eli-darkly Jun 15, 2022
96d1db2
make LDEndToEndClientTest.test____SpecialHttpConfigurations less timi…
eli-darkly Jun 15, 2022
81c04b1
Merge pull request #330 from launchdarkly/eb/sc-157098/flaky-tests
eli-darkly Jun 15, 2022
4aa8e6e
Merge pull request #331 from launchdarkly/eb/sc-157098/flaky-tests-2
eli-darkly Jun 15, 2022
27e58ba
make data source status tests less timing-sensitive
eli-darkly Jun 15, 2022
381b2f6
Merge pull request #332 from launchdarkly/eb/sc-157098/flaky-tests-3
eli-darkly Jun 15, 2022
1e197df
Merge branch 'logging' into eb/sc-138971/logging
eli-darkly Jun 15, 2022
a8448c3
use streaming JSON parsing for incoming LD data
eli-darkly Jun 26, 2022
2dfdaf7
fix tests
eli-darkly Jun 27, 2022
00388db
rm unused
eli-darkly Jun 27, 2022
505b9da
rm unused
eli-darkly Jun 27, 2022
7023c91
use okhttp-eventsource 2.6.0
eli-darkly Jun 29, 2022
9d9f1a4
update eventsource to 2.6.1 to fix pom/manifest problem
eli-darkly Jun 29, 2022
1ce875a
Merge pull request #334 from launchdarkly/eb/sc-157338/eventsource-st…
eli-darkly Jun 30, 2022
dff98fd
increase efficiency of summary event data structures (#335)
eli-darkly Jun 30, 2022
65361fc
merge from public after release
Jul 1, 2022
fadc01d
make reusable EvaluationDetail instances as part of flag preprocessin…
eli-darkly Jul 7, 2022
b41d1d0
make evaluator result object immutable and reuse instances
eli-darkly Jul 7, 2022
c6383a8
comment
eli-darkly Jul 7, 2022
3cad580
avoid creating List iterators during evaluations
eli-darkly Jul 8, 2022
681337e
remove unnecessary copy
eli-darkly Jul 8, 2022
1b8d842
Merge pull request #337 from launchdarkly/eb/sc-158936/reuse-eval-result
eli-darkly Jul 12, 2022
1c706cf
Merge pull request #338 from launchdarkly/eb/sc-158686/fewer-iterators
eli-darkly Jul 12, 2022
cc2eb70
fix allFlagsState to not generate prereq eval events
eli-darkly Jul 20, 2022
81d7d69
Merge pull request #352 from launchdarkly/eb/sc-158936/no-prereq-even…
eli-darkly Jul 20, 2022
d33a606
merge from public after release
Jul 21, 2022
1f75a5c
add "...ForAll" TestData methods to replace "...ForAllUsers"
eli-darkly Jul 27, 2022
d3b7487
bump okhttp & okhttp-eventsource dependencies
eli-darkly Jul 28, 2022
1cc6775
update comment to clarify that level() doesn't apply to SLF4J
eli-darkly Jul 28, 2022
caf0e10
update readme to mention different logging examples in hello-java
eli-darkly Jul 28, 2022
7617814
switch to use snapshot build of java-logging, pending next release
eli-darkly Jul 28, 2022
bc926fa
level setting does not apply to SLF4J and JUL
eli-darkly Jul 28, 2022
21cb4d3
Merge branch 'logging' into eb/sc-138971/logging
eli-darkly Jul 28, 2022
3a4d018
use java-logging 1.1.0 release
eli-darkly Jul 28, 2022
d5c7fdc
make sure META-INF files are never mistaken for classes and relocated
eli-darkly Jul 28, 2022
d99a841
Merge pull request #361 from launchdarkly/eb/sc-161764/okhttp-version
eli-darkly Jul 28, 2022
b3b2703
Merge branch 'main' into eb/sc-138971/logging
eli-darkly Jul 28, 2022
e4dc34d
merge from public after release
Jul 28, 2022
af39f39
Merge pull request #318 from launchdarkly/eb/sc-138971/logging
eli-darkly Jul 28, 2022
6a20188
Merge pull request #358 from launchdarkly/eb/sc-156598/testdata-metho…
eli-darkly Jul 28, 2022
5ad2095
update shared data store test logic to pass ClientContext with logger
eli-darkly Jul 28, 2022
ed818bc
Merge pull request #362 from launchdarkly/eb/sc-138971/store-tests-lo…
eli-darkly Jul 28, 2022
3a54988
enable external javadoc links for com.launchdarkly.logging types
eli-darkly Jul 28, 2022
bb26529
use variable for dependency version
eli-darkly Jul 28, 2022
7757812
Merge pull request #363 from launchdarkly/eb/sc-138971/logging-javado…
eli-darkly Jul 28, 2022
6f946da
merge from public after release
Jul 29, 2022
fa29cf2
fix flaky big segment status polling tests
eli-darkly Jul 29, 2022
6c29106
Merge pull request #366 from launchdarkly/eb/sc-162343/flaky-test
eli-darkly Jul 30, 2022
7ad115b
Update Windows orb, fix Windows JDK install in CI (#372)
aengelberg Aug 30, 2022
f7ad37b
update snakeyaml for CVE-CVE-2022-25857
eli-darkly Sep 2, 2022
658cdc3
latest snakeyaml is 1.31
eli-darkly Sep 2, 2022
c2c6063
Merge pull request #373 from launchdarkly/eb/sc-167615/snakeyaml-update
eli-darkly Sep 2, 2022
2d4eec8
Merge branch 'main' of github.com:launchdarkly/java-server-sdk
eli-darkly Sep 2, 2022
8da0ef2
merge from public after release
Sep 2, 2022
decdb31
bump snakeyaml version for CVE-2022-38752
eli-darkly Sep 12, 2022
a612d96
Merge pull request #374 from launchdarkly/eb/sc-168802/snakeyaml-patch
eli-darkly Sep 12, 2022
d937330
merge from public after release
Sep 13, 2022
cd4a9bd
disable Windows Java 11 build
eli-darkly Oct 3, 2022
6eac0c0
Merge pull request #375 from launchdarkly/eb/sc-171428/no-windows-jav…
eli-darkly Oct 4, 2022
85b9720
fix packaging of com.launchdarkly.logging classes
eli-darkly Oct 14, 2022
52ba6b3
rm debugging
eli-darkly Oct 14, 2022
f4cc631
reconsidered - let's include the logging classes in the jars
eli-darkly Oct 14, 2022
78d1540
fix packaging test logic
eli-darkly Oct 14, 2022
b787f60
correct documentation
eli-darkly Oct 20, 2022
8eaf967
Merge pull request #377 from launchdarkly/eb/sc-173058/packaging
eli-darkly Oct 21, 2022
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
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ workflows:
- benchmarks:
requires:
- build-linux
- build-test-windows:
name: Java 11 - Windows - OpenJDK
openjdk-version: 11.0.2.01
# Windows Java 11 build is temporarily disabled - see story 171428
# - test-windows:
# name: Java 11 - Windows - OpenJDK
# openjdk-version: 11.0.2.01
- build-test-windows:
name: Java 17 - Windows - OpenJDK
openjdk-version: 17.0.1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ This version of the LaunchDarkly SDK works with Java 8 and above.

Three variants of the SDK jar are published to Maven:

* 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/sdk/server-side/java#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 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.
* 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/sdk/server-side/java#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 SLF4J (the SLF4J API is assumed to be brought in automatically as Maven dependencies, or otherwise made available in the classpath of the host application). All third-party 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.
* The extended uberjar - add `<classifier>all</classifier>` in Maven, or `:all` in Gradle. This is the same as the default uberjar except that SLF4J is also bundled, without shading (and is exported in OSGi).
* The "thin" jar - add `<classifier>thin</classifier>` in Maven, or `:thin` in Gradle. This contains _only_ the SDK classes.
* The "thin" jar - add `<classifier>thin</classifier>` in Maven, or `:thin` in Gradle. This contains _only_ the SDK classes. Applications using this jar must provide all of the dependencies that are in the SDK's `build.gradle`, so it is intended for use only in special cases.

## Getting started

Expand Down
27 changes: 15 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ ext.versions = [
"jedis": "2.9.0"
]

// Add dependencies to "libraries.internal" that we use internally but do not expose in
// our public API. Putting dependencies here has the following effects:
// Add dependencies to "libraries.internal" that we use internally but do not necessarily
// expose in our public API. Putting dependencies here has the following effects:
//
// 1. Those classes will be embedded in the default uberjar
// (launchdarkly-java-server-sdk-n.n.n.jar), and also in the "all" jar
// (launchdarkly-java-server-sdk-n.n.n.jar).
//
// 2. The classes are renamed (shaded) within those jars, and all references to them are
// updated to use the shaded names.
// updated to use the shaded names. The only exception to this is classes from
// launchdarkly-java-sdk-common and launchdarkly-logging, which are meant to be part of
// the public API.
//
// 3. The "thin" jar does not contain those classes, and references to them from the code
// in the "thin" jar are *not* renamed. If an application is using the "thin" jar, it is
Expand All @@ -110,6 +112,7 @@ ext.versions = [
// headers for it.
libraries.internal = [
"com.launchdarkly:launchdarkly-java-sdk-common:${versions.launchdarklyJavaSdkCommon}",
"com.launchdarkly:launchdarkly-logging:${versions.launchdarklyLogging}",
"commons-codec:commons-codec:${versions.commonsCodec}",
"com.google.code.gson:gson:${versions.gson}",
"com.google.guava:guava:${versions.guava}",
Expand All @@ -132,7 +135,6 @@ libraries.internal = [
// also as package exports (i.e. it provides them if a newer version is not available
// from an import).
libraries.external = [
"com.launchdarkly:launchdarkly-logging:${versions.launchdarklyLogging}",
"org.slf4j:slf4j-api:${versions.slf4j}"
]

Expand Down Expand Up @@ -229,8 +231,9 @@ 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.
// This builds the default uberjar that contains all of our dependencies in shaded form,
// as well as com.launchdarkly.logging in unshaded form, but does not contain SLF4J. The
// user is expected to provide SLF4J.
shadowJar {
// No classifier means that the shaded jar becomes the default artifact
classifier = ''
Expand Down Expand Up @@ -265,7 +268,7 @@ 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).
// SLF4J is also bundled and exposed (unshaded).
task shadowJarAll(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar) {
classifier = 'all'
group = "shadow"
Expand All @@ -290,9 +293,9 @@ task shadowJarAll(type: com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJ
// configuration phase; this is necessary because they access the build products
doFirst {
shadeDependencies(project.tasks.shadowJarAll)
// The "all" jar exposes its bundled SLF4j dependency as an export - but, like the
// default jar, it *also* imports it ("self-wiring"), which allows the bundle to use a
// higher version if one is provided by another bundle.
// The "all" jar exposes its bundled SLF4j and launchdarkly-logging dependencies as
// exports - but, like the default jar, it *also* imports them ("self-wiring"), which
// allows the bundle to use a higher version if one is provided by another bundle.
addOsgiManifest(project.tasks.shadowJarAll, [ project.configurations.imports ], [ project.configurations.imports ])
}

Expand Down Expand Up @@ -351,7 +354,7 @@ if (JavaVersion.current().isJava8Compatible()) {
// enclosing packages like "com" that don't have any classes in them.
def getAllSdkPackages() {
// base package classes come from launchdarkly-java-sdk-common
def names = [ "com.launchdarkly.sdk", "com.launchdarkly.sdk.json" ]
def names = [ "com.launchdarkly.sdk", "com.launchdarkly.sdk.json", "com.launchdarkly.logging" ]
project.convention.getPlugin(JavaPluginConvention).sourceSets.main.output.each { baseDir ->
if (baseDir.getPath().contains("classes" + File.separator + "java" + File.separator + "main")) {
baseDir.eachFileRecurse { f ->
Expand Down Expand Up @@ -505,7 +508,7 @@ def forEachArtifactAndVisiblePackage(configs, closure) {
configs.collectMany { it.resolvedConfiguration.resolvedArtifacts }
.collectMany { a ->
def exportedPackages = getOsgiPackageExportsFromJar(a.file)
if (exportedPackages == null) {
if (exportedPackages == null || exportedPackages.size == 0) {
// This dependency didn't specify OSGi exports, so we'll just have to assume that
// we might need to use any package that's in this jar (with a little special-casing
// to exclude things we probably should not be importing).
Expand Down
2 changes: 2 additions & 0 deletions packaging-test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ test-all-jar-classes: $(SDK_ALL_JAR) $(TEMP_DIR)
@$(call caption,$@)
@$(call classes_prepare,$<)
@$(call verify_sdk_classes)
@$(call classes_should_contain,com/launchdarkly/logging,unshaded com.launchdarkly.logging classes)
@$(call classes_should_contain,org/slf4j,unshaded SLF4j)
@$(call classes_should_not_contain,com/launchdarkly/shaded/com/launchdarkly/sdk,shaded SDK classes)
@$(call classes_should_contain,com/launchdarkly/shaded/com/google/gson,shaded Gson)
Expand All @@ -101,6 +102,7 @@ test-default-jar-classes: $(SDK_DEFAULT_JAR) $(TEMP_DIR)
@$(call caption,$@)
@$(call classes_prepare,$<)
@$(call verify_sdk_classes)
@$(call classes_should_contain,com/launchdarkly/logging,unshaded com.launchdarkly.logging classes)
@$(call classes_should_not_contain,com/launchdarkly/shaded/com/launchdarkly/sdk,shaded SDK classes)
@$(call classes_should_contain,com/launchdarkly/shaded/com/google/gson,shaded Gson)
@$(call classes_should_not_contain,com/launchdarkly/shaded/org/slf4j,shaded SLF4j)
Expand Down