Skip to content

add conf to disable native app glue#7141

Merged
waruqi merged 5 commits intodevfrom
glue
Dec 16, 2025
Merged

add conf to disable native app glue#7141
waruqi merged 5 commits intodevfrom
glue

Conversation

@waruqi
Copy link
Member

@waruqi waruqi commented Dec 16, 2025

#7139 (comment)

add_rules("mode.debug", "mode.release")

add_requires("raylib 5.5.0")

target("raydemo_custom_glue")
    set_kind("binary")
    set_languages("c++17")
    add_files("src/main.cpp", "src/android_native_app_glue.c")
    add_syslinks("log")
    add_packages("raylib")
    add_rules("android.native_app", {
        android_sdk_version = "35",
        android_manifest = "android/AndroidManifest.xml",
        android_res = "android/res",
        keystore = "android/debug.jks",
        keystore_pass = "123456",
        package_name = "com.raylib.custom_glue",
        native_app_glue = false,
        logcat_filters = {"raydemo_custom_glue", "raylib"}
    })

@waruqi waruqi added this to the v3.0.6 milestone Dec 16, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @waruqi, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the flexibility of Android project configurations within Xmake by introducing a new option to control the inclusion of android_native_app_glue.c. Previously, this file was always added by default. Now, developers can explicitly disable it via a configuration setting, providing more granular control over their project's dependencies and build process, addressing a previous discussion point regarding default behavior.

Highlights

  • Configurable Native App Glue: Introduced a new configuration option to allow users to explicitly disable the automatic inclusion of android_native_app_glue.c in Android projects.
  • Conditional Inclusion Logic: Modified the android.native_app rule to conditionally add the native_app_glue source file and its include path based on the native_app_glue setting in the project's extra configuration.
  • Documentation Update: Added a commented-out example to xmake.lua demonstrating how to use the native_app_glue = false setting, making the new feature discoverable.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a configuration option native_app_glue to allow disabling the automatic inclusion of the Android native app glue code. The implementation is correct, but I've suggested a more concise way to handle the new configuration option in load.lua. The documentation update in xmake.lua is clear and helpful.

Comment on lines +41 to +44
local native_app_glue = true
if extraconf and extraconf.native_app_glue ~= nil then
native_app_glue = extraconf.native_app_glue
end
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The logic for setting the native_app_glue variable can be simplified. The current implementation is correct, but can be expressed more concisely as a single line. This captures the intent of 'default to true unless explicitly set to false' more directly.

    local native_app_glue = not (extraconf and extraconf.native_app_glue == false)

@waruqi waruqi merged commit 0e18ad3 into dev Dec 16, 2025
63 of 64 checks passed
@waruqi waruqi deleted the glue branch December 16, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant