Sha256: 6f25992438e1386fe4c1a5270cafa4435b779ee673001b5436c2b6576b413aa8
Contents?: true
Size: 891 Bytes
Versions: 2
Compression:
Stored size: 891 Bytes
Contents
class AndroidManifestSwitcher def initialize end def update_manifest(config) Solara.logger.start_step("Update AndroidManifest") manifest_file = FilePath.android_manifest if File.exist?(manifest_file) manifest_content = File.read(manifest_file) updated_manifest = update_app_name(manifest_content, config) File.write(manifest_file, updated_manifest) Solara.logger.debug("Updated #{FilePath.android_manifest} to use string resource for app name") else Solara.logger.debug("❌ #{FilePath.android_manifest} not found. Skipping manifest update.") end Solara.logger.end_step("Update AndroidManifest") end private def update_app_name(manifest_content, config) manifest_content.gsub(/android:label="[^"]+"/, 'android:label="@string/app_name"') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
solara-0.2.0 | solara/lib/core/scripts/platform/android/android_manifest_switcher.rb |
solara-0.1.0 | solara/lib/core/scripts/platform/android/android_manifest_switcher.rb |