Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Check if keyStore path is empty #96254

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

raulsntos
Copy link
Member

In godot-build-scripts, the default config.sh sets GODOT_ANDROID_SIGN_KEYSTORE to an empty string but we were only checking if it's null.

Although, I'm not sure why this was being evaluated if I wasn't building the editor.

In `godot-build-scripts`, the default `config.sh` sets `GODOT_ANDROID_SIGN_KEYSTORE` to an empty string but we were only checking if it's null.
@akien-mga
Copy link
Member

Although, I'm not sure why this was being evaluated if I wasn't building the editor.

Do you know why this happens @m4gr3d? I would expect that what's in editor/ shouldn't be used at all unless building the editor.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Aug 29, 2024
@akien-mga akien-mga changed the title [Android] Check if keyStore path is empty [Android] Check if keyStore path is empty Aug 29, 2024
@akien-mga akien-mga merged commit 526b35c into godotengine:master Aug 29, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@raulsntos raulsntos deleted the android/keyStore.isEmpty() branch August 29, 2024 14:16
@raulsntos
Copy link
Member Author

Although, I'm not sure why this was being evaluated if I wasn't building the editor.

Do you know why this happens @m4gr3d?

For more context, this was a custom build from e53dc80 (which was master at the time) and I was building with the following command:

./build.sh -v 4.4-custom -b mono

-b mono means ${CLASSICAL} = 0 and ${MONO} = 1. So if you look at the build-android/build.sh script, it only executes the generateGodotTemplates gradle task.

Gradle log
Welcome to Gradle 8.2!

Here are the highlights of this release:
 - Kotlin DSL: new reference documentation, assignment syntax by default
 - Kotlin DSL is now the default with Gradle init
 - Improved suggestions to resolve errors in console output

For more details see https://docs.gradle.org/8.2/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :
Excluding Android studio build tasks
No native shared libs for target dev. Skipping build.
No native shared libs for target debug. Skipping build.
No native shared libs for target release. Skipping build.
Excluding Android studio build tasks
No native shared libs for target dev. Skipping build.
No native shared libs for target debug. Skipping build.
No native shared libs for target release. Skipping build.
Excluding Android studio build tasks
No native shared libs for target dev. Skipping build.
No native shared libs for target debug. Skipping build.
No native shared libs for target release. Skipping build.

> Configure project :app
WARNING: The option setting 'android.overridePathCheck=true' is experimental.
The current default is 'false'.
WARNING: The option setting 'android.enableResourceOptimizations=false' is deprecated.
The current default is 'true'.
It will be removed in version 9.0 of the Android Gradle plugin.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/root/godot/platform/android/java/editor/build.gradle' line: 42

* What went wrong:
A problem occurred evaluating project ':editor'.
> path may not be null or empty string. path=''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* Where:
Build file '/root/godot/platform/android/java/editor/build.gradle' line: 42

* What went wrong:
A problem occurred evaluating project ':editor'.
> path may not be null or empty string. path=''

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 46s

@m4gr3d
Copy link
Contributor

m4gr3d commented Aug 31, 2024

@akien-mga @raulsntos That's expected. Before running the task, gradle goes through an init and configuration phase for the entire project in order to build a dependency graph. So the :editor project is not being build but configured, which triggers the use of that method.

See https://docs.gradle.org/current/userguide/build_lifecycle.html#sec:build_phases for more details!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants