summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/android/build.gradle.template11
-rw-r--r--platform/android/java/gradle/wrapper/gradle-wrapper.properties2
-rw-r--r--platform/android/java_glue.cpp2
-rw-r--r--platform/x11/godot_x11.cpp5
4 files changed, 13 insertions, 7 deletions
diff --git a/platform/android/build.gradle.template b/platform/android/build.gradle.template
index cc45fee95f..1603ea70d9 100644
--- a/platform/android/build.gradle.template
+++ b/platform/android/build.gradle.template
@@ -1,10 +1,11 @@
buildscript {
repositories {
+ google()
jcenter()
$$GRADLE_REPOSITORY_URLS$$
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.3.3'
+ classpath 'com.android.tools.build:gradle:3.2.0'
$$GRADLE_CLASSPATH$$
}
}
@@ -32,7 +33,7 @@ android {
}
compileSdkVersion 27
- buildToolsVersion "27.0.3"
+ buildToolsVersion "28.0.3"
useLibrary 'org.apache.http.legacy'
packagingOptions {
@@ -75,9 +76,11 @@ android {
$$GRADLE_JNI_DIRS$$
]
}
+
applicationVariants.all { variant ->
- // ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin
- variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk"))
+ variant.outputs.all { output ->
+ output.outputFileName = "../../../../../../../bin/android_${variant.name}.apk"
+ }
}
}
diff --git a/platform/android/java/gradle/wrapper/gradle-wrapper.properties b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
index fe37fa74a9..6fb3a79546 100644
--- a/platform/android/java/gradle/wrapper/gradle-wrapper.properties
+++ b/platform/android/java/gradle/wrapper/gradle-wrapper.properties
@@ -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-4.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index ad8f21785d..07e4048c12 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -883,6 +883,8 @@ static void _initialize_java_modules() {
ERR_EXPLAIN("Couldn't find proper initialize function 'public static Godot.SingletonBase Class::initialize(Activity p_activity)' initializer for singleton class: " + m);
ERR_CONTINUE(!initialize);
}
+ jobject obj = env->CallStaticObjectMethod(singletonClass, initialize, _godot_instance);
+ env->NewGlobalRef(obj);
}
}
}
diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp
index 3241cbcbf9..21148f8e86 100644
--- a/platform/x11/godot_x11.cpp
+++ b/platform/x11/godot_x11.cpp
@@ -43,7 +43,7 @@ int main(int argc, char *argv[]) {
setlocale(LC_CTYPE, "");
char *cwd = (char *)malloc(PATH_MAX);
- getcwd(cwd, PATH_MAX);
+ char *ret = getcwd(cwd, PATH_MAX);
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
if (err != OK) {
@@ -55,7 +55,8 @@ int main(int argc, char *argv[]) {
os.run(); // it is actually the OS that decides how to run
Main::cleanup();
- chdir(cwd);
+ if (ret)
+ chdir(cwd);
free(cwd);
return os.get_exit_code();