Update dependencies

This commit is contained in:
William Brawner 2020-03-19 09:21:26 -06:00
parent c1a7efbadf
commit c01581dbd2
4 changed files with 20 additions and 17 deletions

View file

@ -90,20 +90,20 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.preference:preference:1.1.0' implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-beta01' implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.commonsware.cwac:anddown:0.3.0' implementation 'com.commonsware.cwac:anddown:0.3.0'
implementation 'com.google.firebase:firebase-core:17.2.1' implementation 'com.google.firebase:firebase-core:17.2.3'
implementation 'com.android.billingclient:billing:1.2' implementation 'com.android.billingclient:billing:2.1.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
implementation "androidx.core:core-ktx:1.1.0" implementation "androidx.core:core-ktx:1.2.0"
implementation 'androidx.browser:browser:1.0.0' implementation 'androidx.browser:browser:1.2.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
def coroutines_version = "1.3.0-RC2" def coroutines_version = "1.3.0-RC2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
def lifecycle_version = "2.1.0" def lifecycle_version = "2.2.0"
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
kapt "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" kapt "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation 'eu.crydee:syllable-counter:4.0.2' implementation 'eu.crydee:syllable-counter:4.0.2'

View file

@ -66,8 +66,8 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
return super.onOptionsItemSelected(item) return super.onOptionsItemSelected(item)
} }
override fun onBillingSetupFinished(responseCode: Int) { override fun onBillingSetupFinished(result: BillingResult?) {
if (responseCode != BillingClient.BillingResponse.OK) { if (result?.responseCode != BillingClient.BillingResponseCode.OK) {
return return
} }
@ -75,9 +75,9 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
.setSkusList(listOf("support_the_developer", "tip_coffee", "tip_beer")) .setSkusList(listOf("support_the_developer", "tip_coffee", "tip_beer"))
.setType(BillingClient.SkuType.INAPP) .setType(BillingClient.SkuType.INAPP)
.build() .build()
billingClient.querySkuDetailsAsync(skuDetails) { skuDetailsResponseCode, skuDetailsList -> billingClient.querySkuDetailsAsync(skuDetails) { skuDetailsResponse, skuDetailsList ->
// Process the result. // Process the result.
if (skuDetailsResponseCode != BillingClient.BillingResponse.OK || skuDetailsList.isNullOrEmpty()) { if (skuDetailsResponse?.responseCode != BillingClient.BillingResponseCode.OK || skuDetailsList.isNullOrEmpty()) {
return@querySkuDetailsAsync return@querySkuDetailsAsync
} }
@ -103,9 +103,12 @@ class SupportActivity : AppCompatActivity(), BillingClientStateListener, Purchas
billingClient.startConnection(this) billingClient.startConnection(this)
} }
override fun onPurchasesUpdated(responseCode: Int, purchases: List<Purchase>?) { override fun onPurchasesUpdated(result: BillingResult?, purchases: MutableList<Purchase>?) {
purchases?.forEach { purchase -> purchases?.forEach { purchase ->
billingClient.consumeAsync(purchase.purchaseToken) { _, _ -> val consumeParams = ConsumeParams.newBuilder()
.setPurchaseToken(purchase.purchaseToken)
.build()
billingClient.consumeAsync(consumeParams) { _, _ ->
Toast.makeText( Toast.makeText(
this@SupportActivity, this@SupportActivity,
getString(R.string.support_thank_you), getString(R.string.support_thank_you),

View file

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.3.61'
repositories { repositories {
jcenter() jcenter()
google() google()
@ -10,8 +10,8 @@ buildscript {
} }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.2' classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.google.gms:google-services:4.3.2' classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.0' classpath 'io.fabric.tools:gradle:1.31.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }

View file

@ -1,6 +1,6 @@
#Wed Nov 06 17:12:14 CST 2019 #Thu Mar 19 08:56:07 CST 2020
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip