Skip to content

Commit 48bb2c7

Browse files
author
Pascal Schwenke
committed
Update for Godot 3.3
Removed deprecated getPluginMethods Updated build tools to 30.0.2
1 parent e128de2 commit 48bb2c7

File tree

8 files changed

+9
-18
lines changed

8 files changed

+9
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ gradle/wrapper/gradle-wrapper.properties
1818
gradlew.bat
1919
gradlew
2020
godot-lib.3.2.3.stable.release/build/
21+
godot-lib.3.3.stable.release/build/.transforms/

GodotReviewPlugin/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 29
5-
buildToolsVersion "30.0.0"
5+
buildToolsVersion "30.0.2"
66

77
defaultConfig {
88
minSdkVersion 21
@@ -33,5 +33,5 @@ dependencies {
3333
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
3434
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
3535
implementation 'com.google.android.play:core:1.8.0'
36-
compileOnly project(":godot-lib.3.2.3.stable.release")
36+
compileOnly project(":godot-lib.3.3.stable.release")
3737
}

GodotReviewPlugin/src/main/AndroidManifest.xml

-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
android:name="org.godotengine.plugin.v1.ReviewPlugin"
77
android:value="magicnut.android.godotreviewplugin.ReviewPlugin" />
88
</application>
9-
/
109
</manifest>

GodotReviewPlugin/src/main/java/magicnut/android/godotreviewplugin/ReviewPlugin.java

+3-12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.godotengine.godot.Godot;
1212
import org.godotengine.godot.plugin.GodotPlugin;
1313
import org.godotengine.godot.plugin.SignalInfo;
14+
import org.godotengine.godot.plugin.UsedByGodot;
1415

1516
import java.util.Arrays;
1617
import java.util.List;
@@ -30,7 +31,7 @@ public class ReviewPlugin extends GodotPlugin {
3031
*/
3132
public ReviewPlugin(Godot godot) {
3233
super(godot);
33-
activity = godot;
34+
activity = godot.getActivity();
3435
}
3536

3637
@NonNull
@@ -39,17 +40,6 @@ public String getPluginName() {
3940
return PLUGIN_NAME;
4041
}
4142

42-
/**
43-
* Return all the method names as list that can be called from godot side.
44-
*
45-
* @return
46-
*/
47-
@NonNull
48-
@Override
49-
public List<String> getPluginMethods() {
50-
return Arrays.asList("startInAppReview");
51-
}
52-
5343
/**
5444
* A set of all signals the plugin can emit.
5545
*
@@ -67,6 +57,7 @@ public Set<SignalInfo> getPluginSignals() {
6757
return signals;
6858
}
6959

60+
@UsedByGodot
7061
public void startInAppReview() {
7162
activity.runOnUiThread(() -> {
7263
ReviewManager manager = ReviewManagerFactory.create(activity);

godot-lib.3.2.3.stable.release/build.gradle

-2
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
configurations.maybeCreate("default")
2+
artifacts.add("default", file('godot-lib.3.3.stable.release.aar'))

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
include ':godot-lib.3.2.3.stable.release'
1+
include ':godot-lib.3.3.stable.release'
22
include ':GodotReviewPlugin'
33
rootProject.name = "GodotInAppReviewPlugin"

0 commit comments

Comments
 (0)