Skip to content

Commit

Permalink
Add androidnamespace API to generate namespace in build.gradle.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Apr 29, 2024
1 parent d4aecde commit 340b825
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions android_studio/_preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ p.api.register
kind = "list:string"
}

p.api.register
{
name = "androidnamespace",
scope = "workspace",
kind = "string"
}

p.api.register
{
name = "gradleproperties",
Expand Down
6 changes: 5 additions & 1 deletion android_studio/android_studio.lua
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,11 @@ function m.generate_project(prj)
end

p.push('android {')


if prj.androidnamespace then
p.x('namespace "%s"', prj.androidnamespace)
end

complete_signing_info = false
if prj.androidkeyalias and
prj.androidkeystorefile and
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ androidminsdkversion "25"
androidndkversion "26.2.11394342"
androidndkpath "file_path_to_ndk_directory_is_optional"
androidappid "com.company.application"
androidnamespace "com.company.application"

-- extra build settings to apply to each config (config scope)
androidbuildsettings
Expand Down

0 comments on commit 340b825

Please sign in to comment.