-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from hellokitty-coding-club/release/v1.1.2
[RELEASE] v1.1.2
- Loading branch information
Showing
33 changed files
with
561 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item android:id="@+id/edit_profile" | ||
<item android:id="@+id/edit" | ||
android:title="@string/edit"/> | ||
</menu> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/lgtm/android/data/repository/LoggingRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.lgtm.android.data.repository | ||
|
||
import com.lgtm.domain.repository.LoggingRepository | ||
import com.swm.logging.android.SWMLogging | ||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
import javax.inject.Inject | ||
|
||
class LoggingRepositoryImpl @Inject constructor() : LoggingRepository { | ||
override fun shotSwmLogging(scheme: SWMLoggingScheme) { | ||
SWMLogging.logEvent(scheme) | ||
} | ||
} |
67 changes: 67 additions & 0 deletions
67
domain/src/main/java/com/lgtm/domain/logging/SwmCommonLoggingScheme.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.lgtm.domain.logging | ||
|
||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
import java.lang.reflect.Type | ||
|
||
class SwmCommonLoggingScheme( | ||
eventLogName: String, | ||
screenName: String, | ||
logVersion: String, | ||
logData: Map<String, Any>, | ||
) : SWMLoggingScheme() { | ||
|
||
init { | ||
setLoggingScheme( | ||
eventLogName = eventLogName, | ||
screenName = screenName, | ||
logVersion = logVersion, | ||
logData = logData.toMutableMap() | ||
) | ||
} | ||
|
||
class Builder { | ||
private lateinit var eventLogName: String | ||
private lateinit var screenName: String | ||
private var logVersion: String = "1" | ||
private var map = mapOf<String, Any>() | ||
|
||
fun setEventLogName(eventLogName: String): Builder { | ||
this.eventLogName = eventLogName | ||
return this | ||
} | ||
|
||
fun setScreenName(screenName: String): Builder { | ||
this.screenName = screenName | ||
return this | ||
} | ||
|
||
fun setScreenName(type: Type): Builder { | ||
check(type is Class<*>) | ||
this.screenName = type.simpleName | ||
return this | ||
} | ||
|
||
|
||
fun setLogData(map: Map<String, Any>): Builder { | ||
this.map = map | ||
return this | ||
} | ||
|
||
fun setLogVersion(logVersion: Int): Builder { | ||
this.logVersion = logVersion.toString() | ||
return this | ||
} | ||
|
||
fun build(): SwmCommonLoggingScheme { | ||
check(::eventLogName.isInitialized) { "eventLogName is not initialized" } | ||
check(::screenName.isInitialized) { "screenName is not initialized" } | ||
|
||
return SwmCommonLoggingScheme( | ||
eventLogName, | ||
screenName, | ||
logVersion, | ||
map | ||
) | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
domain/src/main/java/com/lgtm/domain/repository/LoggingRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.lgtm.domain.repository | ||
|
||
import com.swm.logging.android.logging_scheme.SWMLoggingScheme | ||
|
||
interface LoggingRepository { | ||
fun shotSwmLogging(scheme: SWMLoggingScheme) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.