Skip to content

Commit

Permalink
fix: change default attributes to more meaningful values (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeopt authored Apr 1, 2022
1 parent ff2ed95 commit 97168d1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2016-2021, Optimizely, Inc. and contributors *
* Copyright 2016-2022, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand Down Expand Up @@ -74,10 +74,9 @@ static Map<String, String> buildDefaultAttributesMap(Context context, Logger log
Map<String, String> attrMap = new HashMap<>();

attrMap.put(DEVICE_MODEL_KEY, androidDeviceModel);
attrMap.put(SDK_VERSION_KEY, androidSdkVersionName);
attrMap.put(SDK_VERSION_KEY, androidSdkVersion);
attrMap.put(OS_VERSION_KEY, androidOSVersion);
String appVersion = androidAppVersionName + Integer.toString(androidAppVersion);
attrMap.put(APP_VERSION_KEY, appVersion);
attrMap.put(APP_VERSION_KEY, androidAppVersionName);

return attrMap;
}
Expand Down
18 changes: 10 additions & 8 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ android {
minSdkVersion 14
targetSdkVersion target_sdk_version
versionCode 1
versionName "1.0"
versionName "1.0.2"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
testOptions {
Expand All @@ -41,20 +41,22 @@ android {

dependencies {
// Includes the Optimizely X Full Stack Java SDK, event handler, and user profile
//implementation "com.optimizely.ab:android-sdk:1.0.0"
implementation (project(':android-sdk')) {
exclude group: 'com.google.code.gson', module:'gson'
// exclude group: 'com.noveogroup.android', module:'android-logger'
}

// EXAMPLE - replace gson with jackson-databind json parser
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion"

// SLF4J logger
// https://github.com/noveogroup/android-logger (resources/android-logger.properties)
implementation "com.noveogroup.android:android-logger:$android_logger_ver"
// implementation "com.optimizely.ab:android-sdk:1.0.0"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "com.google.android.material:material:1.2.1"
// EXAMPLE - replace noveogroup android-looger with slf4j-android logger
// https://mvnrepository.com/artifact/org.slf4j/slf4j-android
//implementation "org.slf4j:slf4j-android:1.7.25"
// EXAMPLE - replace gson with jackson-databind json parser
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonversion"

implementation "androidx.appcompat:appcompat:1.2.0"
implementation "com.google.android.material:material:1.2.1"

// required by API-16
implementation "com.google.code.gson:gson:$gson_ver"
Expand Down
4 changes: 2 additions & 2 deletions test-app/src/main/resources/android-logger.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
# https://github.com/noveogroup/android-logger
# Valid logging levels are: VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT

# Default configuration (disabled because it would override tags from the application)
#root=DEBUG:Optly
# Default configuration
root=DEBUG:Optly

# Core
logger.com.optimizely.ab.Optimizely=DEBUG:Optly.core
Expand Down

0 comments on commit 97168d1

Please sign in to comment.