Skip to content

Commit

Permalink
update to the latest godot 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
i-bardinov committed Nov 10, 2021
1 parent 18e6e57 commit 4fafa65
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Godot Google Play In-App Review Plugin

This is a Android plugin for [Godot Engine](https://github.com/godotengine/godot) 3.2.2 or higher.
This is a Android plugin for [Godot Engine](https://github.com/godotengine/godot) 3.4 or higher.

This plugin supports:
- Request review
Expand Down
4 changes: 2 additions & 2 deletions config/GodotGooglePlayInAppReview.gdap
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

name="GodotGooglePlayInAppReview"
binary_type="local"
binary="GodotGooglePlayInAppReview.1.0.0.release.aar"
binary="GodotGooglePlayInAppReview.1.0.1.release.aar"

[dependencies]

remote=["com.google.android.play:core:1.8.0"]
remote=["com.google.android.play:core:1.10.2"]
2 changes: 1 addition & 1 deletion godot-google-play-inapp-review/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:7.0.3'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
15 changes: 5 additions & 10 deletions godot-google-play-inapp-review/godot-inappreview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ plugins {
id 'com.android.library'
}

ext.pluginVersionCode = 1
ext.pluginVersionName = "1.0.0"
ext.pluginVersionCode = 2
ext.pluginVersionName = "1.0.1"

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 31

defaultConfig {
minSdkVersion 16
targetSdkVersion 29
targetSdkVersion 31
versionCode pluginVersionCode
versionName pluginVersionName

Expand All @@ -30,16 +29,12 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.google.android.play:core:1.8.0'
implementation 'com.google.android.play:core:1.10.2'
implementation "androidx.legacy:legacy-support-v4:1.0.0"

compileOnly project(':godot-lib.release')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@
import androidx.collection.ArraySet;

public class GodotGooglePlayInAppReview extends GodotPlugin {
private Activity activity = null; // The main activity of the game
ReviewManager manager = null;
ReviewInfo reviewInfo = null;

public GodotGooglePlayInAppReview(Godot godot) {
super(godot);
activity = godot;
}

@NonNull
Expand Down Expand Up @@ -60,7 +58,7 @@ public Set<SignalInfo> getPluginSignals() {
*/
public void requestReviewInfo() {
if (manager == null) {
manager = ReviewManagerFactory.create(activity);
manager = ReviewManagerFactory.create(getActivity());
}
Task<ReviewInfo> request = manager.requestReviewFlow();
request.addOnCompleteListener(task -> {
Expand All @@ -79,7 +77,7 @@ public void requestReviewInfo() {
*
*/
public void launchReviewFlow() {
Task<Void> flow = manager.launchReviewFlow(activity, reviewInfo);
Task<Void> flow = manager.launchReviewFlow(getActivity(), reviewInfo);
flow.addOnCompleteListener(task -> {
emitSignal("on_launch_review_flow_success");
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip

0 comments on commit 4fafa65

Please sign in to comment.