Skip to content

Commit ff679d6

Browse files
authored
Merge pull request #1520 from NativeScript/vmutafov/fix-kotlin-analytics
Fix analytics collection to be independent of Kotlin usage
2 parents d4227ec + 3adb61e commit ff679d6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test-app/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def computeBuildToolsVersion = { ->
8686
def enableAnalytics = (project.hasProperty("gatherAnalyticsData") && project.gatherAnalyticsData == "true")
8787
def analyticsFilePath = "$rootDir/analytics/build-statistics.json"
8888
def analyticsCollector = project.ext.AnalyticsCollector.withOutputPath(analyticsFilePath)
89-
if (enableKotlin && enableAnalytics) {
90-
analyticsCollector.markHasUseKotlinPropertyInApp()
89+
if (enableAnalytics) {
90+
analyticsCollector.markUseKotlinPropertyInApp(enableKotlin)
9191
analyticsCollector.writeAnalyticsFile()
9292
}
9393

test-app/app/gradle-helpers/AnalyticsCollector.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class AnalyticsCollector{
1919
return new AnalyticsCollector(analyticsFilePath)
2020
}
2121

22-
void markHasUseKotlinPropertyInApp() {
23-
hasUseKotlinPropertyInApp = true
22+
void markUseKotlinPropertyInApp(boolean useKotlin) {
23+
hasUseKotlinPropertyInApp = useKotlin
2424
}
2525

2626
void writeAnalyticsFile() {
@@ -45,4 +45,4 @@ class AnalyticsCollector{
4545
}
4646
}
4747

48-
ext.AnalyticsCollector = AnalyticsCollector
48+
ext.AnalyticsCollector = AnalyticsCollector

0 commit comments

Comments
 (0)