mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-29 05:05:37 +08:00
add app.manifest_metadata which can be used to provide <meta-data …> elements to the AndroidManifest.xml file
This commit is contained in:
@@ -245,6 +245,13 @@ EOS
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="#{App.config.package}" android:versionCode="1" android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="#{App.config.api_version}"/>
|
||||
<application android:label="#{App.config.name}" android:debuggable="true" #{App.config.icon ? ('android:icon="@drawable/' + App.config.icon + '"') : ''}>
|
||||
EOS
|
||||
App.config.manifest_metadata.each do |key, val|
|
||||
android_manifest_txt << <<EOS
|
||||
<meta-data android:name=\"#{key}\" android:value=\"#{val}\"/>
|
||||
EOS
|
||||
end
|
||||
android_manifest_txt << <<EOS
|
||||
<activity android:name="#{App.config.main_activity}" android:label="#{App.config.name}">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
@@ -28,7 +28,8 @@ module Motion; module Project;
|
||||
register :android
|
||||
|
||||
variable :sdk_path, :ndk_path, :avd_config, :package, :main_activity,
|
||||
:sub_activities, :api_version, :arch, :assets_dirs, :icon
|
||||
:sub_activities, :api_version, :arch, :assets_dirs, :icon,
|
||||
:manifest_metadata
|
||||
|
||||
def initialize(project_dir, build_mode)
|
||||
super
|
||||
@@ -37,6 +38,7 @@ module Motion; module Project;
|
||||
@sub_activities = []
|
||||
@arch = 'armv5te'
|
||||
@assets_dirs = [File.join(project_dir, 'assets')]
|
||||
@manifest_metadata = {}
|
||||
end
|
||||
|
||||
def validate
|
||||
|
||||
Reference in New Issue
Block a user