Skip to content

Commit 721885a

Browse files
committed
quickjs-experiments
1 parent 6f188ed commit 721885a

File tree

8 files changed

+1463
-13
lines changed

8 files changed

+1463
-13
lines changed

core/src/main/java/com/segment/analytics/kotlin/core/platform/plugins/logger/LogTarget.kt

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ package com.segment.analytics.kotlin.core.platform.plugins.logger
22

33
import com.segment.analytics.kotlin.core.Analytics
44
import com.segment.analytics.kotlin.core.BaseEvent
5-
import com.segment.analytics.kotlin.core.platform.Plugin
6-
import java.util.*
5+
import java.util.Date
76
import kotlin.reflect.KClass
87

98
/**
@@ -122,9 +121,9 @@ enum class MetricType {
122121
fun Analytics.log(message: String, kind: LogFilterKind? = null, function: String = "", line: Int = -1) {
123122

124123
// Check if we should send the event
125-
if (!SegmentLog.loggingEnabled) {
126-
return
127-
}
124+
// if (!SegmentLog.loggingEnabled) {
125+
// return
126+
// }
128127

129128
val plugins = findAll(SegmentLog::class)
130129
plugins.forEach {

samples/kotlin-android-app-destinations/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ dependencies {
7878
implementation 'com.segment.analytics.kotlin.destinations:mixpanel:1.5.2'
7979

8080
implementation 'com.eclipsesource.j2v8:j2v8:6.2.0@aar'
81+
// repositories {
82+
// maven { url 'https://jitpack.io' }
83+
// }
84+
// implementation "com.github.seven332:quickjs-android:0.1.0"
85+
repositories {
86+
flatDir {
87+
dirs 'libs'
88+
}
89+
}
90+
91+
implementation(name:'library-debug', ext:'aar')
8192
}
8293

8394
// Partner Dependencies
Binary file not shown.

samples/kotlin-android-app-destinations/src/androidTest/assets/sample2.js

+443
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function fn(n) {
2+
var x = JSON.stringify(n)
3+
console.log(x)
4+
n["newKey"] = "newVal"
5+
return n
6+
};

0 commit comments

Comments
 (0)