Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ repositories {

dependencies {
api(libs.android.retrofuture)
api(libs.okhttp)
api(libs.okio)
api(libs.slf4j.api)
api(libs.gson)
api(libs.commons.codec)
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=10.4.3
version=11.0.0

org.gradle.jvmargs=-Xmx2g
6 changes: 1 addition & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
[versions]
sonarqube = "5.0.0.4638"
maven-publish = "0.32.0"
okhttp = "4.12.0"
okio = "3.4.0" # indirect dependency to solve security vulnerability in 3.2.0
slf4j-api = "1.7.36"
gson = "2.9.0"
commons-codec = "1.15"
semantic-version = "2.1.1"
junit-jupiter = "5.10.0"
logback = "1.5.13"
logback = "1.5.19"
mockwebserver = "4.12.0"
mockito = "4.8.0"
android-retrofuture = "1.7.4"
android-gradle = "8.0.0"

[libraries]
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j-api" }
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
commons-codec = { module = "commons-codec:commons-codec", version.ref = "commons-codec" }
Expand Down
2 changes: 1 addition & 1 deletion samples/android-java/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.4.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.configcat:configcat-android-client:10.0.0'
implementation 'com.configcat:configcat-android-client:11.0.0'
implementation 'org.slf4j:slf4j-api:2.0.7'
implementation 'com.github.tony19:logback-android:3.0.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@

import androidx.appcompat.app.AppCompatActivity;

import com.configcat.ConfigCatClient;
import com.configcat.LogLevel;
import com.configcat.SharedPreferencesCache;
import com.configcat.User;
import com.configcat.*;


public class MainActivity extends AppCompatActivity {
Expand All @@ -22,9 +19,15 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);

client = ConfigCatClient.get("PKDVCLf-Hq-h-kCzMp-L7Q/HhOWfwVtZ0mb30i9wi17GQ", options -> {
options.pollingMode(PollingModes.autoPoll(5));

// Use ConfigCat's shared preferences cache.
options.cache(new SharedPreferencesCache(getApplicationContext()));

// With this option, the SDK automatically switches between offline and online modes based on
// whether the application is in the foreground or background and on network availability.
options.watchAppStateChanges(getApplicationContext());

// Info level logging helps to inspect the feature flag evaluation process.
// Use the default Warning level to avoid too detailed logging in your application.
options.logLevel(LogLevel.DEBUG);
Expand All @@ -42,7 +45,7 @@ private void fetchNewConfig() {
.thenAccept(value -> {
this.runOnUiThread(() -> {
TextView viewById = this.findViewById(R.id.editText);
viewById.setText("isPOCFeatureEnabled: " + value);
viewById.setText(String.format("isPOCFeatureEnabled: %s", value));
});
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Jan 05 11:38:37 CET 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading