Skip to content

Commit

Permalink
Update for Godot 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Shin-NiL committed Apr 23, 2021
1 parent 456dc4c commit e89bc7c
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 36 deletions.
45 changes: 22 additions & 23 deletions demo/export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,50 @@ export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""

[preset.0.options]

graphics/32_bits_framebuffer=true
xr_features/xr_mode=0
xr_features/degrees_of_freedom=0
xr_features/hand_tracking=0
xr_features/focus_awareness=false
one_click_deploy/clear_previous_install=true
custom_template/debug=""
custom_template/release=""
custom_template/use_custom_build=true
custom_template/export_format=0
plugins/GodotShare=true
command_line/extra_args=""
architectures/armeabi-v7a=true
architectures/arm64-v8a=false
architectures/x86=true
architectures/x86_64=false
keystore/debug=""
keystore/debug_user=""
keystore/debug_password=""
keystore/release=""
keystore/release_user=""
keystore/release_password=""
one_click_deploy/clear_previous_install=true
version/code=1
version/name="1.0"
package/unique_name="org.godotengine.$genname"
package/name=""
package/signed=true
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
graphics/32_bits_framebuffer=true
graphics/opengl_debug=false
xr_features/xr_mode=0
xr_features/degrees_of_freedom=0
xr_features/hand_tracking=0
xr_features/focus_awareness=false
screen/immersive_mode=true
screen/orientation=0
screen/support_small=true
screen/support_normal=true
screen/support_large=true
screen/support_xlarge=true
screen/opengl_debug=false
launcher_icons/main_192x192=""
launcher_icons/adaptive_foreground_432x432=""
launcher_icons/adaptive_background_432x432=""
keystore/debug=""
keystore/debug_user=""
keystore/debug_password=""
keystore/release=""
keystore/release_user=""
keystore/release_password=""
command_line/extra_args=""
apk_expansion/enable=false
apk_expansion/SALT=""
apk_expansion/public_key=""
architectures/armeabi-v7a=true
architectures/arm64-v8a=false
architectures/x86=false
architectures/x86_64=false
permissions/custom_permissions=PoolStringArray( )
permissions/access_checkin_properties=false
permissions/access_coarse_location=false
Expand Down
1 change: 1 addition & 0 deletions demo/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ margin_right = 720.0
margin_bottom = 671.0
text = "SHARE CAPTURE"
script = ExtResource( 1 )

[connection signal="pressed" from="share_btn" to="share_btn" method="_on_share_btn_pressed"]
6 changes: 6 additions & 0 deletions share-plugin/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions share-plugin/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion share-plugin/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion share-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.android.tools.build:gradle:4.1.3'


// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions share-plugin/godotshare/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
versionCode 3
versionName "3.0.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import org.godotengine.godot.Godot;
import org.godotengine.godot.plugin.GodotPlugin;
import org.godotengine.godot.plugin.UsedByGodot;

import java.io.File;
import java.util.Arrays;
Expand All @@ -21,9 +22,10 @@ public class GodotShare extends GodotPlugin {

public GodotShare(Godot godot) {
super(godot);
activity = godot;
activity = godot.getActivity();
}

@UsedByGodot
public void shareText(String title, String subject, String text) {
Log.d(TAG, "shareText called");
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
Expand All @@ -33,6 +35,7 @@ public void shareText(String title, String subject, String text) {
activity.startActivity(Intent.createChooser(sharingIntent, title));
}

@UsedByGodot
public void sharePic(String path, String title, String subject, String text) {
Log.d(TAG, "sharePic called");

Expand Down Expand Up @@ -60,10 +63,4 @@ public void sharePic(String path, String title, String subject, String text) {
public String getPluginName() {
return "GodotShare";
}

@NonNull
@Override
public List<String> getPluginMethods() {
return Arrays.asList("sharePic", "shareText");
}
}
4 changes: 2 additions & 2 deletions share-plugin/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Jun 29 09:13:34 BRT 2020
#Fri Apr 23 18:42:14 BRT 2021
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-6.5-bin.zip

0 comments on commit e89bc7c

Please sign in to comment.