Skip to content

Commit

Permalink
prepare 3.1.4 release (#158)
Browse files Browse the repository at this point in the history
## [3.1.4] - 2022-03-23
### Fixed
- Removed Android Appcompat dependency.
- Bump version of okhttp from 4.9.1 to 4.9.2.
- Prevent multiple allocations of the DiagnosticEventProcessor.
- Removed application `android:label` attribute from the SDK's manifest. (Thanks, [Exaper](#156)!)
  • Loading branch information
louis-launchdarkly committed Mar 23, 2022
1 parent e0b14e1 commit 5adb4de
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 28 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

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

## [3.1.4] - 2022-03-23
### Fixed
- Removed Android Appcompat dependency.
- Bump version of okhttp from 4.9.1 to 4.9.2.
- Prevent multiple allocations of the DiagnosticEventProcessor.
- Removed application `android:label` attribute from the SDK's manifest. (Thanks, [Exaper](https://github.com/launchdarkly/android-client-sdk/pull/156)!)

## [3.1.3] - 2022-02-24
### Fixed
- Add explicit proguard directives for keeping BroadcastReceivers
Expand Down
2 changes: 1 addition & 1 deletion example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ dependencies {

implementation(project(":launchdarkly-android-client-sdk"))
// Comment the previous line and uncomment this one to depend on the published artifact:
//implementation("com.launchdarkly:launchdarkly-android-client-sdk:3.1.3")
//implementation("com.launchdarkly:launchdarkly-android-client-sdk:3.1.4")
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
version=3.1.3
version=3.1.4

sonatypeUsername=
sonatypePassword=
Expand Down
20 changes: 8 additions & 12 deletions launchdarkly-android-client-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,13 @@ configurations {
ext {}
ext.versions = [
"androidAnnotation": "1.2.0",
"androidAppcompat": "1.2.0",
"androidJunit": "1.1.2",
"androidTest": "1.3.0",
"easymock": "4.3",
"eventsource": "1.11.2",
"gson": "2.8.9",
"jacksonCore": "2.10.5",
"jacksonDatabind": "2.10.5.1",
"junit": "4.13",
"launchdarklyJavaSdkCommon": "1.2.0",
"okhttp": "4.9.1",
"okhttp": "4.9.2",
"timber": "5.0.1",
]

Expand All @@ -79,22 +75,22 @@ dependencies {

implementation("com.google.code.gson:gson:${versions.gson}")
implementation("androidx.annotation:annotation:${versions.androidAnnotation}")
implementation("androidx.appcompat:appcompat:${versions.androidAppcompat}")
implementation("com.launchdarkly:okhttp-eventsource:${versions.eventsource}")
implementation("com.squareup.okhttp3:okhttp:${versions.okhttp}")
implementation("com.jakewharton.timber:timber:${versions.timber}")

testImplementation("junit:junit:${versions.junit}")

androidTestImplementation("junit:junit:${versions.junit}")
androidTestImplementation("androidx.test:core:${versions.androidTest}")
androidTestImplementation("androidx.test:runner:${versions.androidTest}")
androidTestImplementation("androidx.test:rules:${versions.androidTest}")
androidTestImplementation("androidx.test.ext:junit:${versions.androidJunit}")
androidTestImplementation("org.easymock:easymock:${versions.easymock}")
androidTestImplementation("com.squareup.okhttp3:mockwebserver:${versions.okhttp}")

androidTestUtil("androidx.test:orchestrator:${versions.androidTest}")
androidTestImplementation("androidx.test:core:1.4.0")
androidTestImplementation("androidx.test:runner:1.4.0")
androidTestImplementation("androidx.test:rules:1.4.0")
androidTestImplementation("androidx.test.ext:junit:1.1.3")
androidTestImplementation("org.easymock:easymock:4.3")

androidTestUtil("androidx.test:orchestrator:1.4.1")
}

task javadoc(type: Javadoc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<application android:usesCleartextTraffic="true">
<activity
android:name="com.launchdarkly.sdk.android.TestActivity"
android:theme="@style/Theme.AppCompat.Light" />
android:theme="@android:style/Theme.DeviceDefault" />
</application>

<!-- This suppression is because the Android linter falsely flags the targetPackage as unresolved. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.launchdarkly.sdk.android;

import android.app.Activity;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

public class TestActivity extends AppCompatActivity {
public class TestActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,18 @@ private void enqueueEvent() {
}

void startScheduler() {
long initialDelay = config.getDiagnosticRecordingIntervalMillis() - (System.currentTimeMillis() - diagnosticStore.getDataSince());
long safeDelay = Math.min(Math.max(initialDelay, 0), config.getDiagnosticRecordingIntervalMillis());

executorService = Executors.newSingleThreadScheduledExecutor(diagnosticThreadFactory);
executorService.scheduleAtFixedRate(
this::enqueueEvent,
safeDelay,
config.getDiagnosticRecordingIntervalMillis(),
TimeUnit.MILLISECONDS
);
if (executorService == null) {
long initialDelay = config.getDiagnosticRecordingIntervalMillis() - (System.currentTimeMillis() - diagnosticStore.getDataSince());
long safeDelay = Math.min(Math.max(initialDelay, 0), config.getDiagnosticRecordingIntervalMillis());

executorService = Executors.newSingleThreadScheduledExecutor(diagnosticThreadFactory);
executorService.scheduleAtFixedRate(
this::enqueueEvent,
safeDelay,
config.getDiagnosticRecordingIntervalMillis(),
TimeUnit.MILLISECONDS
);
}
}

void stopScheduler() {
Expand Down

0 comments on commit 5adb4de

Please sign in to comment.