Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Integrate CMake build into Gradle + Android Studio #8363

Merged
merged 2 commits into from
Mar 17, 2017

Conversation

kkaefer
Copy link
Member

@kkaefer kkaefer commented Mar 11, 2017

No description provided.

@mention-bot
Copy link

@kkaefer, thanks for your PR! By analyzing this pull request, we identified @tmpsantos, @jfirebaugh and @1ec5 to be potential reviewers.

@kkaefer kkaefer force-pushed the cmake-android-studio branch from 99a9033 to 1cf44c0 Compare March 11, 2017 03:36
@tobrun
Copy link
Member

tobrun commented Mar 13, 2017

I have taken this PR for a spin and is looking great:

Compiling c++ code as part of the build:

screen shot 2017-03-13 at 10 06 00

Using LLDB debugger directly in IDE with breakpoint support:

screen shot 2017-03-13 at 10 21 24

@kkaefer kkaefer force-pushed the cmake-android-studio branch 6 times, most recently from aadcd2c to 42cc60a Compare March 14, 2017 10:56
Copy link
Contributor

@ivovandongen ivovandongen left a comment

Choose a reason for hiding this comment

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

Working great! Thanks.

@tobrun tobrun mentioned this pull request Mar 14, 2017
13 tasks
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

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

Love it! Created a folllow-up issue for updating the project documentation in #8390. Thanks for picking this up! 🚀

@kkaefer kkaefer requested review from zugaldia and jfirebaugh March 14, 2017 16:31
Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

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

👌 C++ debugging worked on the first try.

@@ -250,11 +250,6 @@ target_link_libraries(mapbox-gl
PUBLIC -Wl,--gc-sections
)

# Create a stripped version of the library and copy it to the JNIDIR.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this still happen somewhere else? Do we need to update metrics.sh?

Copy link
Member Author

Choose a reason for hiding this comment

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

before:
200,816,848 bytes: build/android-arm-v8-21/Release/libmapbox-gl.so
  5,510,144 bytes: platform/android/MapboxGLAndroidSDK/src/main/jniLibs/arm64-v8a/libmapbox-gl.so

after:
201,035,760 bytes: platform/android/MapboxGLAndroidSDK/build/intermediates/cmake/release/obj/arm64-v8a/libmapbox-gl.so
  5,510,144 bytes: platform/android/MapboxGLAndroidSDK/build/intermediates/bundles/default/jni/arm64-v8a/libmapbox-gl.so

The Gradle build automatically strips the symbols before putting them into the APK.

Given that the output path is now different, I also updated metrics.sh.

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

Successfully merging this pull request may close these issues.

5 participants