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

Integrate CMake build into Gradle + Android Studio - #8363

Merged
kkaefer merged 2 commits into
masterfrom
cmake-android-studio
Mar 17, 2017
Merged

kkaefer merged 2 commits into
masterfrom
cmake-android-studio

Conversation

@kkaefer

@kkaefer kkaefer commented Mar 11, 2017

Copy link
Copy Markdown
Member

No description provided.

@mention-bot

Copy link
Copy Markdown

@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

tobrun commented Mar 13, 2017

Copy link
Copy Markdown
Member

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

@ivovandongen ivovandongen left a comment

Copy link
Copy Markdown
Contributor

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 done

@tobrun tobrun left a comment

Copy link
Copy Markdown
Member

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 jfirebaugh and zugaldia March 14, 2017 16:31

@jfirebaugh jfirebaugh left a comment

Copy link
Copy Markdown
Contributor

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.

PUBLIC -Wl,--gc-sections
)

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

Copy link
Copy Markdown
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
Copy Markdown
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