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

Commit ffa134a

Browse files
prepare 1.1.0 release (#3)
1 parent 4373fda commit ffa134a

30 files changed

+1141
-278
lines changed

.circleci/config.yml

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: 2.1
22

33
orbs:
44
win: circleci/[email protected]
5+
android: circleci/[email protected]
56

67
workflows:
78
test:
@@ -43,6 +44,7 @@ jobs:
4344
- run: java -version
4445
- run: ./gradlew dependencies
4546
- run: ./gradlew jar
47+
- run: ./gradlew javadoc
4648
- run: ./gradlew checkstyleMain
4749
- persist_to_workspace:
4850
root: build
@@ -121,49 +123,31 @@ jobs:
121123
path: .\junit
122124

123125
build-test-android:
124-
# This is adapted from the CI build for android-client-sdk
125-
macos:
126-
xcode: "10.3.0"
127-
shell: /bin/bash --login -eo pipefail
128-
working_directory: ~/launchdarkly/android-client-sdk-private
129-
environment:
130-
TERM: dumb
131-
QEMU_AUDIO_DRV: none
132-
_JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -Xms2048m -Xmx4096m"
133-
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
134-
JVM_OPTS: -Xmx3200m
135-
ANDROID_HOME: "/usr/local/share/android-sdk"
136-
ANDROID_SDK_HOME: "/usr/local/share/android-sdk"
137-
ANDROID_SDK_ROOT: "/usr/local/share/android-sdk"
126+
executor:
127+
name: android/android-machine
128+
resource-class: large
129+
138130
steps:
139131
- checkout
132+
133+
# What we want to do here is somewhat unusual: we want Android to run all of our tests from
134+
# src/test/java, but run them in the Android emulator (to prove that we're only using Java
135+
# APIs that our minimum Android API version supports). Normally, only tests in
136+
# src/androidTest/java would be run that way. Also, Android needs a different JUnit test
137+
# runner annotation on all of the test classes. So we can't just run the test code as-is.
138+
#
139+
# This step copies all the code from src/test/java into src/androidTest/java, except for the
140+
# base class BaseTest.java, which is already defined in src/androidTest/java to provide the
141+
# necessary test runner annotation.
140142
- run:
141-
name: Install Android tools
142-
command: ./scripts/install-android-tools.sh
143-
- run:
144-
name: Start Android environment
145-
command: ./scripts/start-android-env.sh
146-
background: true
147-
timeout: 1200
148-
no_output_timeout: 20m
149-
- run:
150-
name: Wait for Android environment
151-
command: ./scripts/started-android-env.sh
152-
- run:
153-
name: Run tests
154-
command: ./scripts/run-android-tests.sh
155-
no_output_timeout: 20m
156-
- run:
157-
name: Save test results
158-
command: |
159-
mkdir -p ~/test-results
160-
cp -r ./build/outputs/androidTest-results/* ~/test-results/
161-
when: always
162-
- run:
163-
name: Stop Android environment
164-
command: ./scripts/stop-android-env.sh
165-
when: always
143+
name: Copy tests
144+
command: rsync -r ./src/test/java/ ./src/androidTest/java/ --exclude='BaseTest.java'
145+
146+
- android/start-emulator-and-run-tests:
147+
system-image: system-images;android-21;default;x86
148+
max-tries: 1
149+
post-emulator-launch-assemble-command: ./gradlew -b build-android.gradle :assembleAndroidTest
150+
test-command: ./gradlew -b build-android.gradle :connectedAndroidTest
151+
166152
- store_test_results:
167-
path: ~/test-results
168-
- store_artifacts:
169-
path: ~/artifacts
153+
path: ./build/outputs/androidTest-results

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Eclipse project files
22
.classpath
33
.project
4-
4+
.settings
5+
56
# Intellij project files
67
*.iml
78
*.ipr

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ See [Contributing](https://github.com/launchdarkly/dotnet-sdk-common/blob/master
2626
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
2727
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
2828
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
29-
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ jacocoTestCoverageVerification {
8787
// The key for each of these items is the complete method signature minus the "com.launchdarkly.sdk." prefix.
8888
"EvaluationReason.error(com.launchdarkly.sdk.EvaluationReason.ErrorKind)": 1,
8989
"EvaluationReasonTypeAdapter.parse(com.google.gson.stream.JsonReader)": 1,
90-
"EvaluationDetailTypeAdapterFactory.EvaluationDetailTypeAdapter.read(com.google.gson.stream.JsonReader)": 1,
9190
"LDValue.equals(java.lang.Object)": 1,
92-
"LDValueTypeAdapter.read(com.google.gson.stream.JsonReader)": 3,
93-
"json.JsonSerialization.getDeserializableClasses()": -1
91+
"LDValueTypeAdapter.read(com.google.gson.stream.JsonReader)": 1,
92+
"json.JsonSerialization.getDeserializableClasses()": -1,
93+
"json.LDGson.LDTypeAdapter.write(com.google.gson.stream.JsonWriter, java.lang.Object)": 1,
94+
"json.LDJackson.GsonReaderToJacksonParserAdapter.peekInternal()": 3
9495
]
9596

9697
knownMissedLinesForMethods.each { partialSignature, maxMissedLines ->

scripts/circleci/LICENSE

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

scripts/circleci/circle-android

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

scripts/install-android-tools.sh

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

scripts/run-android-tests.sh

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

scripts/start-android-env.sh

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

scripts/started-android-env.sh

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

0 commit comments

Comments
 (0)