From eb0165dc6184f0043fb2365d6c1a4445ec0340de Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Sun, 3 Jan 2021 17:12:32 +0100 Subject: [PATCH 1/3] Updates and changes for 3.2.4 --- GodotGooglePlayBilling.gdap | 4 ++-- build.gradle | 2 +- godot-google-play-billing/build.gradle | 12 ++++++------ .../googleplaybilling/GodotGooglePlayBilling.java | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/GodotGooglePlayBilling.gdap b/GodotGooglePlayBilling.gdap index 03505b5..f6fa002 100644 --- a/GodotGooglePlayBilling.gdap +++ b/GodotGooglePlayBilling.gdap @@ -2,7 +2,7 @@ name="GodotGooglePlayBilling" binary_type="local" -binary="GodotGooglePlayBilling.1.0.1.release.aar" +binary="GodotGooglePlayBilling.1.0.2.release.aar" [dependencies] -remote=["com.android.billingclient:billing:3.0.0"] +remote=["com.android.billingclient:billing:3.0.2"] diff --git a/build.gradle b/build.gradle index 25a626a..9166da3 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:4.0.0" + classpath "com.android.tools.build:gradle:4.0.2" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/godot-google-play-billing/build.gradle b/godot-google-play-billing/build.gradle index 551c6ba..8ceb424 100644 --- a/godot-google-play-billing/build.gradle +++ b/godot-google-play-billing/build.gradle @@ -2,16 +2,16 @@ plugins { id 'com.android.library' } -ext.pluginVersionCode = 2 -ext.pluginVersionName = "1.0.1" +ext.pluginVersionCode = 3 +ext.pluginVersionName = "1.0.2" android { - compileSdkVersion 29 - buildToolsVersion "29.0.3" + compileSdkVersion 30 + buildToolsVersion "30.0.3" defaultConfig { minSdkVersion 18 - targetSdkVersion 29 + targetSdkVersion 30 versionCode pluginVersionCode versionName pluginVersionName } @@ -25,6 +25,6 @@ android { dependencies { implementation "androidx.legacy:legacy-support-v4:1.0.0" - implementation 'com.android.billingclient:billing:3.0.0' + implementation 'com.android.billingclient:billing:3.0.2' compileOnly fileTree(dir: 'libs', include: ['godot-lib*.aar']) } diff --git a/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java b/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java index b5c1d12..4bc04d4 100644 --- a/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java +++ b/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java @@ -68,7 +68,7 @@ public GodotGooglePlayBilling(Godot godot) { super(godot); billingClient = BillingClient - .newBuilder(getActivity()) + .newBuilder(godot.requireContext()) .enablePendingPurchases() .setListener(this) .build(); @@ -187,7 +187,7 @@ public Dictionary purchase(String sku) { .setSkuDetails(skuDetails) .build(); - BillingResult result = billingClient.launchBillingFlow(getActivity(), purchaseParams); + BillingResult result = billingClient.launchBillingFlow(getGodot().requireActivity(), purchaseParams); Dictionary returnValue = new Dictionary(); if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) { From 2563e54768e487c106bc38a3a73e697df771bd58 Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Thu, 7 Jan 2021 23:05:23 +0100 Subject: [PATCH 2/3] Use getActivity instead of accessing Context/Activity via this.godot --- .../plugin/googleplaybilling/GodotGooglePlayBilling.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java b/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java index 4bc04d4..b5c1d12 100644 --- a/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java +++ b/godot-google-play-billing/src/main/java/org/godotengine/godot/plugin/googleplaybilling/GodotGooglePlayBilling.java @@ -68,7 +68,7 @@ public GodotGooglePlayBilling(Godot godot) { super(godot); billingClient = BillingClient - .newBuilder(godot.requireContext()) + .newBuilder(getActivity()) .enablePendingPurchases() .setListener(this) .build(); @@ -187,7 +187,7 @@ public Dictionary purchase(String sku) { .setSkuDetails(skuDetails) .build(); - BillingResult result = billingClient.launchBillingFlow(getGodot().requireActivity(), purchaseParams); + BillingResult result = billingClient.launchBillingFlow(getActivity(), purchaseParams); Dictionary returnValue = new Dictionary(); if (result.getResponseCode() == BillingClient.BillingResponseCode.OK) { From 16f2c581a3b12b56cfb75efbfca6104725100cc6 Mon Sep 17 00:00:00 2001 From: Timo Schwarzer Date: Mon, 11 Jan 2021 14:38:29 +0100 Subject: [PATCH 3/3] Use SDK 30 in Travis CI --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69c17d1..e32fc7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,10 @@ dist: trusty android: components: - build-tools-29.0.3 - - android-29 + - android-30 + +before_install: + - yes | sdkmanager "platforms;android-30" before_cache: - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock @@ -16,5 +19,5 @@ cache: - $HOME/.gradle/wrapper/ script: - - wget -P ./godot-google-play-billing/libs https://downloads.tuxfamily.org/godotengine/3.2.2/rc2/godot-lib.3.2.2.rc2.release.aar + - wget -P ./godot-google-play-billing/libs https://downloads.tuxfamily.org/godotengine/3.2.4/beta5/godot-lib.3.2.4.beta5.release.aar - ./gradlew build -s