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

Commit e0339e8

Browse files
prepare 1.1.2 release (#5)
1 parent 20c016f commit e0339e8

File tree

8 files changed

+229
-241
lines changed

8 files changed

+229
-241
lines changed

build-android.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
jcenter()
1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.6.0'
12+
classpath 'com.android.tools.build:gradle:4.2.0'
1313
}
1414
}
1515
// This Gradle script is used only when we are running tests in an Android environment to verify
@@ -60,6 +60,14 @@ android {
6060
}
6161

6262
dependencies {
63+
// See note in build-shared.gradle on the purpose of "privateImplementation". The
64+
// Android Gradle plugin doesn't seem to have a good way to customize the classpath
65+
// of the compile and test tasks, but since we're not actually publishing any
66+
// Android artifacts from this project (we use this build only for CI testing), we
67+
// can simply copy the dependencies from "privateImplementation" into the standard
68+
// "implementation" for the Android build.
69+
implementation configurations.privateImplementation
70+
6371
androidTestImplementation "junit:junit:4.12"
6472
androidTestImplementation "org.hamcrest:hamcrest-library:1.3"
6573
androidTestImplementation "com.android.support.test:runner:1.0.2"

build-shared.gradle

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,36 @@ ext {
1717

1818
ext.versions = [
1919
"gson": "2.7",
20-
"jackson": "2.10.0"
20+
"jacksonCore": "2.10.5",
21+
"jacksonDatabind": "2.10.5.1"
2122
]
2223

2324
ext.libraries = [:]
2425

26+
configurations {
27+
privateImplementation
28+
}
29+
2530
dependencies {
26-
// Dependencies will not be exposed in the pom - see below in pom.withXml block
27-
implementation "com.google.code.gson:gson:${versions.gson}"
28-
implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
29-
implementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
31+
// The Gson and Jackson dependencies go into a custom configuration here, instead of
32+
// the regular "implementation" configuration. We don't want them to be visible at
33+
// all in the module's published dependencies - not even in "runtime" scope - because:
34+
//
35+
// 1. For Gson: While java-sdk-common does need Gson in order to work, the
36+
// LaunchDarkly SDKs that use java-sdk-common have different strategies for packaging
37+
// Gson. The Android SDK exposes it as a regular dependency; the Java server-side SDK
38+
// embeds and shades Gson and does not expose it as a dependency. So we are leaving
39+
// it up to the SDK to provide Gson in some way.
40+
//
41+
// 2. For Jackson: The SDKs do not use, require, or embed Jackson; we provide the
42+
// LDJackson class as a convenience for applications that do use Jackson, and it is
43+
// only usable if the application already has Jackson in its classpath. So we do not
44+
// want Jackson to show up as a transitive dependency.
45+
privateImplementation "com.google.code.gson:gson:${versions.gson}"
46+
privateImplementation "com.fasterxml.jackson.core:jackson-core:${versions.jacksonCore}"
47+
privateImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jacksonDatabind}"
3048

49+
testImplementation configurations.privateImplementation
3150
testImplementation "org.hamcrest:hamcrest-library:1.3"
3251
testImplementation "junit:junit:4.12"
3352
}

build.gradle

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)