Skip to content

Commit 7c821df

Browse files
committed
quickjs-experiments
1 parent 55f64ad commit 7c821df

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

Lines changed: 4 additions & 5 deletions
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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ dependencies {
7171
implementation 'androidx.lifecycle:lifecycle-common-java8:2.3.1'
7272

7373
implementation 'com.eclipsesource.j2v8:j2v8:6.2.0@aar'
74+
// repositories {
75+
// maven { url 'https://jitpack.io' }
76+
// }
77+
// implementation "com.github.seven332:quickjs-android:0.1.0"
78+
repositories {
79+
flatDir {
80+
dirs 'libs'
81+
}
82+
}
83+
84+
implementation(name:'library-debug', ext:'aar')
7485
}
7586

7687
// Partner Dependencies
Binary file not shown.

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

Lines changed: 443 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
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)