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

Support android exports #18

Closed
2shady4u opened this issue May 29, 2020 · 14 comments · Fixed by #34
Closed

Support android exports #18

2shady4u opened this issue May 29, 2020 · 14 comments · Fixed by #34
Labels
enhancement New feature or request

Comments

@2shady4u
Copy link
Contributor

Just polling how hard it would be to add a way to export to Android?
Would it be a lot of work or is it just a single text line away?

@abarichello
Copy link
Owner

We are currently working on #17, android builds are going to be the next supported target

@abarichello abarichello added the enhancement New feature or request label May 29, 2020
@abarichello abarichello changed the title Would an android export be possible? Support android exports May 29, 2020
@2shady4u
Copy link
Contributor Author

2shady4u commented Jul 2, 2020

Seems like some android CI exports already exist, such as:
https://github.com/dbrova15/godot-ci-android-bakz

It seems relatively easy to just merge these with the already existing Dockerfile? Or are there any complications that I am not seeing?

@realkotob
Copy link
Collaborator

realkotob commented Jul 5, 2020

@2shady4u Just saw the repo you shared, it looks great 👍

I would prefer to create a new image with android support instead of merging, similar to what we did for mono. That way we do not bloat the image unnecessarily for people who don't need android support.

We'll even make a fourth mono + android image to be safe :)

For now I would like to test the image myself on one of my android projects, and we can also invite @dbrova15 to open a PR if he'd like to help maintain this.

@2shady4u
Copy link
Contributor Author

2shady4u commented Jul 5, 2020

ok, sounds great!

Just a question though: it is possible for gitlab CI to derive from multiple docker images, cause i have a case where i want to build for windows, web and android at the same time.
Meaning that I would need to use both the default docker image (for windows and web) and the android image.

How would this be done?

@realkotob
Copy link
Collaborator

realkotob commented Jul 5, 2020

@2shady4u It's possible but that might make the CI slower if you don't optimize it, so I'd suggest to just use the android image for all of them. That's what I'd do.

You can optimize your gitlab-ci.yml afterwards if you know what you're doing.

To be clear, the android image supports non-android exports, and the mono image supports non-mono exports. The reason they're separate images instead of having them in one big image is because it adds more CI time to load the bigger images.

@dbrova15
Copy link

dbrova15 commented Jul 6, 2020

Hello, @asheraryam. It would be great to make one image for all platforms. At the moment, my image only works with the base Godot build. If you enable custom assembly, an error occurs.

I talked about this here: godotengine/godot#29385 (comment)

1 similar comment
@dbrova15
Copy link

dbrova15 commented Jul 7, 2020

Hello, @asheraryam. It would be great to make one image for all platforms. At the moment, my image only works with the base Godot build. If you enable custom assembly, an error occurs.

I talked about this here: godotengine/godot#29385 (comment)

@realkotob
Copy link
Collaborator

realkotob commented Jul 8, 2020

@dbrova15 I was able to use the other image and it worked (myood/godot-ci-android-export:godot-3.2.2-beta4) but I had an error using your docker image (bakz151/godot-ci-android-bakz:latest).

It seems it cannot find the jarsigner, which is weird since the docker images are very similar.

$ ls -l /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner
ls: /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner: No such file or directory
ERROR: Job failed: exit code 1

This is mentioned in godotengine/godot#29385 and it seems to be due to editor settings.

And regarding the custom build, it seems we'll need to look into the engine code and see why this might be failing.

@realkotob
Copy link
Collaborator

realkotob commented Jul 8, 2020

@2shady4u You should be able to use the docker image I mentioned to setup CI for android using the myood image.

Below is the ci config I'm using in case you have any trouble, you can copy the extra sed operations I added.

Note that my game is not in the root of the git repo, it is inside a subfolder called "godot", so it's better to use the yaml from the dbrova repo and adjust it where necessary (such as to use the image myood/godot-ci-android-export:godot-3.2.2-beta4).

gitlab-ci.yml.zip

@dbrova15
Copy link

dbrova15 commented Jul 8, 2020

@asheraryam This is really strange since I took dockerfile myood/godot-ci-android-export as the basis. I wanted to modify it to fix the custom build.

@realkotob
Copy link
Collaborator

realkotob commented Jul 8, 2020

Yeah it's definitely very weird, since I used the yaml config from your repo, so if anything I would have expected it to not work with the myood image.

I'll try my own build of the docker file in the weekend and see why it could be causing this error.

@realkotob
Copy link
Collaborator

@dbrova15 @myood I just noticed that there has been an update on one of the CI repos that could help with the custom builds, see this diff myood/godot-ci-android-export@6a374b3

Seems we should try the latest image from myood to see if it solves the issue.

@dbrova15
Copy link

dbrova15 commented Jul 9, 2020

I added this line as soon as I noticed that this setting is not. So this does not solve the problem. But in any case, I will try this image. Maybe the same magic works here as with jarsigner :)

@myood
Copy link

myood commented Jul 18, 2020

I updated my images master/godot-3.2.2 and can export to android with custom build successfully.
I'm using godot-3.2.2-stable with godot-firebase plugin and export succeeds.
My yaml differs much from the sample in the github repo, but I updated the sample and it should work now.

Here's what changed: myood/godot-ci-android-export@7065599

[edit] Actually I should elaborate a little. In godot 3.2.2 android export was refactored, so there are a lot of changes that break backward compatibility. If you know exactly what you're doing, you should be able to update your existing builds. Or you can create exports from scratch. Either way looking up the godot 3.2.2 docks is highly recommended. It took me a while to adapt all things, and abviously there were some quirks (like gradle missing executable permissions). AFAIR changes were needed to editor settings, export settings, my local repo, I hade to redownload build templates, and... maybe that's it. Comparing godot-3.2.2 and godot-3.1.2 branches from my repo may be helpful also.

Good luck, because it's a hassle. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants