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

refactor(android): Replace SDK C/C++ build system with cmake #12230

Merged
merged 7 commits into from Nov 3, 2020

Conversation

jquick-axway
Copy link
Contributor

@jquick-axway jquick-axway commented Oct 29, 2020

JIRA:
https://jira.appcelerator.org/browse/TIMOB-27787

Note:
This change applies to building the Titanium SDK.
Titanium apps/modules have not been changed to use cmake.

Summary:

  • Replaced makefile build system with cmake.
  • Can now debug SDK's C++ code with breakpoints in Android Stuido.
  • Significantly improved SDK incremental build times.
    • Code generation now only overwrites files if content has changed.
    • If ccache is installed, then subsequent clean builds will be about 5x faster.

C++ Debugging Test:
(This test is for @sgtcoolguy or @garymathews .)

  1. Open ./titanium_sdk/android in Android Studio 4.1 or higher.
  2. Open source file: ./titanium_sdk/android/runtime/v8/src/native/V8Runtime.cpp
  3. Set breakpoint within the nativeInit() function.
  4. Click the "Debug 'app'" button on the toolbar. (Icon looks like a bug.)
  5. Verify the debugger breaks at that breakpoint upon app launch.

App Build Test:

  1. Build and run kitchen-sink-v2 on Android.
  2. Tap on the "Phone" tab.
  3. Tap on the "Maps" row.
  4. Verify a map is displayed.

Module Build Test:

  1. Download the source for the ti.imagefactory module.
  2. Open the Terminal.
  3. CD to the ./ti.imagefactory/android folder.
  4. Enter: appc run -p android
  5. Verify that the module successfully builds and runs.

- Allows C++ debugging/breakpoint support in Android Studio.
- Improves SDK build times.

Fixes TIMOB-27787
@build
Copy link
Contributor

build commented Oct 29, 2020

Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 10070 tests are passing.
(There are 975 skipped tests not included in that total)

Generated by 🚫 dangerJS against aa20fe8

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

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

CR: PASS

Works great!

NOTE: When using ccache on Windows the CCACHE_READONLY_DIRECT=1 environment variable must be specified due to file-lock issues. Maybe this could be added to the PR?

… properties

- Warning message was telling people to do something that was deprecated.
@sgtcoolguy sgtcoolguy merged commit 453fbde into tidev:master Nov 3, 2020
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.

None yet

5 participants