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

Migrate Android build to gradle+CMake #2475

Merged
merged 4 commits into from
Mar 17, 2021
Merged

Conversation

Ghabry
Copy link
Member

@Ghabry Ghabry commented Mar 11, 2021

To build set env var EASYRPG_TOOLCHAIN_DIRS to the paths that contain all the Android toolchains.
Then run "gradle assembleRelease" and the magic happens.

Fix #621

To build set EASYRPG_TOOLCHAIN_DIR and EASYRPG_LIBLCF_DIR to the paths that contain all the Android toolchains.
Then run "gradle assembleRelease" and the magic happens.

Fix EasyRPG#621
@Ghabry Ghabry added this to the 0.6.3 milestone Mar 11, 2021
@Ghabry
Copy link
Member Author

Ghabry commented Mar 15, 2021

Dont merge this yet.
I want to invent a way to pass custom CMake flags to the gradle CMake invocation.
It is completely unclear to me who at Google thought it is a good idea to push a feature that has literally zero official customization points (also the documentation is really lacking). They had at least 3 years to fix this, they just dont care.

…ONE;PATH_TWO;PATH_THREE" instead of an env var

Additional CMake arguments are possible with -PcmakeOptions or env var ORG_GRADLE_PROJECT_cmakeOptions
@Ghabry
Copy link
Member Author

Ghabry commented Mar 17, 2021

CMake options are now possible with -PcmakeOptions="-DOPTION1=ON OPTION2=OFF" or env var ORG_GRADLE_PROJECT_cmakeOptions="-DOPTION1=ON OPTION2=OFF" (the env var is a built-in gradle feature)

@Ghabry Ghabry requested a review from carstene1ns March 17, 2021 16:35
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.7)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was just thinking we could add this to the main CMakeLists as well.
However, it is currently really convoluted, so maybe we should split other things out like this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo it would make sense to move all the system dependent stuff in CmakeLists.txt in the build/ folder. Currently the main file is quite messy.

When devkitXXX and VitaSDK are ever built through CMake we could hide all the custom stuff (build_vpk, make_dol, etc.) in subfolders.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When devkitXXX and VitaSDK are ever built through CMake we could hide all the custom stuff (build_vpk, make_dol, etc.) in subfolders.

of course!

@@ -1,3 +1,8 @@
android.enableJetifier=true
android.useAndroidX=true
android.useDeprecatedNdk=true

VERSION_NAME=1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should start to set these with each release from now on.
This way f-droid will have it easier at least.

Copy link
Member

@carstene1ns carstene1ns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works 👍🏼

@carstene1ns carstene1ns merged commit 4a5a823 into EasyRPG:master Mar 17, 2021
@Ghabry Ghabry deleted the android-cmake branch May 27, 2021 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

ndk-build is stupid and tries to compile any .cpp file in src
3 participants