Skip to content

Commit

Permalink
Merge branch 'v5' into card_single_result
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahkoop committed Dec 7, 2023
2 parents 191851b + 00ca9c2 commit 54ce6fb
Show file tree
Hide file tree
Showing 56 changed files with 311 additions and 239 deletions.
8 changes: 4 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Setup Java 11
description: 'Sets up Java 11'
name: Setup Java 17
description: 'Sets up Java 17'
runs:
using: "composite"
steps:
- name: Set up Java 11
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
6 changes: 3 additions & 3 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Java 11
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'microsoft'
java-version: '17'
distribution: 'zulu'
- name: Lint
run: ./ci lint
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Java 11
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'zulu'
- name: Unit Tests
run: ./ci unit_tests
1 change: 0 additions & 1 deletion ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ The Braintree SDK uses code from the following libraries:
* [Retrofit](https://github.com/square/retrofit), Apache License Version 2.0
* [Robolectric](https://github.com/robolectric/robolectric), MIT License
* [SDK Manager Plugin](https://github.com/JakeWharton/sdk-manager-plugin), Apache License Version 2.0
* [Stetho](https://github.com/facebook/stetho), BSD License
13 changes: 12 additions & 1 deletion AmericanExpress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
namespace "com.braintreepayments.api.americanexpress"
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -27,6 +28,16 @@ android {
sourceCompatibility versions.javaSourceCompatibility
targetCompatibility versions.javaTargetCompatibility
}

kotlinOptions {
jvmTarget = "11"
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("11"))
}
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions AmericanExpress/src/main/AndroidManifest.xml

This file was deleted.

21 changes: 18 additions & 3 deletions BraintreeCore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ plugins {
def DEVELOPMENT_URL = System.properties['DEVELOPMENT_URL'] ?: '"http://10.0.2.2:3000/"'

android {
compileSdkVersion rootProject.compileSdkVersion
namespace "com.braintreepayments.api"
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -19,6 +20,11 @@ android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

buildConfigField "String", "VERSION_NAME", "\"${rootProject.versionName}\""
javaCompileOptions {
annotationProcessorOptions {
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}

testOptions {
Expand All @@ -44,6 +50,16 @@ android {
sourceCompatibility versions.javaSourceCompatibility
targetCompatibility versions.javaTargetCompatibility
}

kotlinOptions {
jvmTarget = "11"
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("11"))
}
}
}


Expand All @@ -63,7 +79,6 @@ dependencies {
api project(':SharedUtils')

androidTestImplementation deps.playServicesWallet
androidTestImplementation deps.dexmakerMockito
androidTestImplementation deps.androidxTestRules
androidTestImplementation deps.androidxTestRunner
androidTestImplementation deps.junitTest
Expand All @@ -85,7 +100,7 @@ dependencies {
testImplementation project(':Card')

// Ref: https://kotlin.github.io/dokka/1.8.0-SNAPSHOT/user_guide/applying/gradle/#applying-plugins
dokkaHtmlPartialPlugin 'org.jetbrains.dokka:android-documentation-plugin:1.7.20'
dokkaHtmlPartialPlugin 'org.jetbrains.dokka:android-documentation-plugin:1.9.10'
}

android.buildTypes.each { type ->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "26584d407930d52f3d62ef77e729f1b4",
"entities": [
{
"tableName": "analytics_event",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `timestamp` INTEGER NOT NULL, `_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL)",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "id",
"columnName": "_id",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"_id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '26584d407930d52f3d62ef77e729f1b4')"
]
}
}
3 changes: 1 addition & 2 deletions BraintreeCore/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.braintreepayments.api">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />

Expand Down
2 changes: 1 addition & 1 deletion BraintreeCore/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.braintreepayments.api">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down

This file was deleted.

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

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

/**
Expand All @@ -9,13 +11,14 @@ import androidx.work.WorkerParameters
* It is not subject to semantic versioning and may change at any time.
* @suppress
*/
open class AnalyticsUploadWorker(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
class AnalyticsUploadWorker(
context: Context,
params: WorkerParameters
) : AnalyticsBaseWorker(context, params) {
) : Worker(context, params) {

override fun doWork(): Result {
val analyticsClient = createAnalyticsClientFromInputData()
val analyticsClient = AnalyticsClient(applicationContext)
return analyticsClient.uploadAnalytics(applicationContext, inputData)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.braintreepayments.api

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

/**
Expand All @@ -9,13 +11,14 @@ import androidx.work.WorkerParameters
* It is not subject to semantic versioning and may change at any time.
* @suppress
*/
open class AnalyticsWriteToDbWorker(
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
class AnalyticsWriteToDbWorker(
context: Context,
params: WorkerParameters
) : AnalyticsBaseWorker(context, params) {
) : Worker(context, params) {

override fun doWork(): Result {
val analyticsClient = createAnalyticsClientFromInputData()
val analyticsClient = AnalyticsClient(applicationContext)
return analyticsClient.writeAnalytics(inputData)
}
}
2 changes: 1 addition & 1 deletion BraintreeCore/src/test/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.braintreepayments.api" xmlns:tools="http://schemas.android.com/tools">
xmlns:tools="http://schemas.android.com/tools">

<!-- replace Cardinal android:label from manifest merge for unit testing purposes -->
<application android:label="Test Application" tools:replace="android:label" />
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* All Modules
* Bump `minSdkVersion` to API 23
* Bump target Java version to Java 11
* Ugrapde Kotlin version to 1.9.10
* Upgrade to Android Gradle Plugin 8
* BraintreeCore
* Remove `BraintreeClient` public constructors
* Remove `ClientTokenProvider`
Expand Down
13 changes: 12 additions & 1 deletion Card/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
namespace "com.braintreepayments.api.card"
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand All @@ -27,6 +28,16 @@ android {
sourceCompatibility versions.javaSourceCompatibility
targetCompatibility versions.javaTargetCompatibility
}

kotlinOptions {
jvmTarget = "11"
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("11"))
}
}
}

dependencies {
Expand Down
3 changes: 1 addition & 2 deletions Card/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.braintreepayments.api">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />

Expand Down
4 changes: 0 additions & 4 deletions Card/src/main/AndroidManifest.xml

This file was deleted.

13 changes: 12 additions & 1 deletion DataCollector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ plugins {
}

android {
compileSdkVersion rootProject.compileSdkVersion
namespace "com.braintreepayments.api.datacollector"
compileSdk rootProject.compileSdkVersion

defaultConfig {
minSdkVersion rootProject.minSdkVersion
Expand Down Expand Up @@ -33,6 +34,16 @@ android {
sourceCompatibility versions.javaSourceCompatibility
targetCompatibility versions.javaTargetCompatibility
}

kotlinOptions {
jvmTarget = "11"
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of("11"))
}
}
}

dependencies {
Expand Down
5 changes: 0 additions & 5 deletions DataCollector/src/main/AndroidManifest.xml

This file was deleted.

Loading

0 comments on commit 54ce6fb

Please sign in to comment.