Skip to content

Commit

Permalink
Merge pull request #663 from braintree/kotlin_analytics
Browse files Browse the repository at this point in the history
Refactor Analytics to Kotlin
  • Loading branch information
sshropshire authored Feb 1, 2023
2 parents 34448ae + fcd1a10 commit b0d780f
Show file tree
Hide file tree
Showing 23 changed files with 821 additions and 834 deletions.
10 changes: 7 additions & 3 deletions BraintreeCore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ plugins {
id 'org.jetbrains.dokka'
id 'de.marcphilipp.nexus-publish'
id 'signing'
id 'kotlin-kapt'
}

def DEVELOPMENT_URL = System.properties['DEVELOPMENT_URL'] ?: '"http://10.0.2.2:3000/"';
def DEVELOPMENT_URL = System.properties['DEVELOPMENT_URL'] ?: '"http://10.0.2.2:3000/"'

android {
compileSdkVersion rootProject.compileSdkVersion
Expand Down Expand Up @@ -51,13 +52,15 @@ android {

dependencies {
implementation deps.appCompat
implementation deps.work
implementation deps.workKtx

implementation deps.coreKtx
implementation deps.kotlinStdLib

implementation deps.roomRuntime
annotationProcessor deps.roomCompiler

// Ref: https://stackoverflow.com/a/51067251
kapt deps.roomCompiler

api deps.browserSwitch
api project(':SharedUtils')
Expand All @@ -81,6 +84,7 @@ dependencies {
testImplementation deps.powermockMockito
testImplementation deps.powermockClassloading
testImplementation deps.jsonAssert
testImplementation deps.mockk
testImplementation project(':PayPal')
testImplementation project(':TestUtils')
testImplementation project(':UnionPay')
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.braintreepayments.api

import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters

// NEXT_MAJOR_VERSION: remove this class, it may no longer be needed

/**
* Class for background analytics tasks.
* This class is used internally by the SDK and should not be used directly.
* It is not subject to semantic versioning and may change at any time.
* @suppress
*/
abstract class AnalyticsBaseWorker(
context: Context,
workerParams: WorkerParameters
) : Worker(context, workerParams) {

internal open fun createAnalyticsClientFromInputData(): AnalyticsClient {
return AnalyticsClient(applicationContext)
}
}

This file was deleted.

Loading

0 comments on commit b0d780f

Please sign in to comment.