Sha256: 386e914e3f16772ecece72484f655bb742a9231e5f56b47d57642f5ea61008f1

Contents?: true

Size: 1 KB

Versions: 15

Compression:

Stored size: 1 KB

Contents

class PropertiesGenerator
    def initialize(brand_key)
        @brand_key = brand_key
    end

    def generate
        Solara.logger.start_step("Generate brand.properties for Android")
        output_file = FilePath.android_generated_properties
        content = "# Generated by Solara\n"

        load_config.each do |key, value|
            content << "#{key}=#{value}\n"
        end

        File.write(output_file, content)
        Solara.logger.debug("🎉 Generated properties file: #{output_file}, content below ⬇️")
        Solara.logger.debug("--------------\n#{content}--------------")
        Solara.logger.end_step("Generate brand.properties for Android")
    end

    def load_config
        config_path = FilePath.android_brand_config(@brand_key)
        signing_path = FilePath.brand_signing(@brand_key, Platform::Android)
        config = JSON.parse(File.read(config_path))
        signing_config = JSON.parse(File.read(signing_path))

        config.merge!(signing_config)

        config
      end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
solara-0.7.4 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.7.3 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.7.2 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.7.1 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.7.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.6.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.5.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.4.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.3.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.2.4 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.2.3 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.2.2 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.2.1 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.2.0 solara/lib/core/scripts/platform/android/properties_generator.rb
solara-0.1.0 solara/lib/core/scripts/platform/android/properties_generator.rb