<commit_before>if defined?(Motion::Project::App)
  # iOS or Android project.
  dirname = File.dirname(__FILE__)
  case Motion::Project::App.template
    when :android
      require "#{dirname}/android.rb"
    when :ios, :tvos, :osx, :'ios-extension'
      require "#{dirname}/cocoa.rb"
    else
      raise "Project template #{Motion::Project::App.template} not supported by Flow"
  end
else
  # Flow project.
  def invoke_rake(platform, task)
    trace = Rake.application.options.trace == true

    template = platform == :android ? 'android' : 'cocoa'
    system "template=#{platform} /usr/bin/rake -r \"#{File.dirname(__FILE__)}/#{template}.rb\" -f \"config/#{platform}.rb\" \"#{task}\" #{trace ? '--trace' : ''}" or exit 1
  end
  namespace 'ios' do
    desc "Create an .ipa archive"
    task "archive" do
      invoke_rake 'ios', 'archive'
    end
    desc "Create an .ipa archive for distribution (AppStore)"
    task "archive:distribution" do
      invoke_rake 'ios', 'archive:distribution'
    end
    desc "Build everything"
    task "build" do
      invoke_rake 'ios', 'build'
    end
    desc "Build the device version"
    task "build:device" do
      invoke_rake 'ios', 'build:device'
    end<commit_msg>Fix regression crashing "rake android:emulator"<commit_after>if defined?(Motion::Project::App)
  # iOS or Android project.
  dirname = File.dirname(__FILE__)
  case Motion::Project::App.template
    when :android
      require "#{dirname}/android.rb"
    when :ios, :tvos, :osx, :'ios-extension'
      require "#{dirname}/cocoa.rb"
    else
      raise "Project template #{Motion::Project::App.template} not supported by Flow"
  end
else
  # Flow project.
  def invoke_rake(platform, task)
    trace = Rake.application.options.trace == true

    template = platform.to_s == 'android' ? 'android' : 'cocoa'
    system "template=#{platform} /usr/bin/rake -r \"#{File.dirname(__FILE__)}/#{template}.rb\" -f \"config/#{platform}.rb\" \"#{task}\" #{trace ? '--trace' : ''}" or exit 1
  end
  namespace 'ios' do
    desc "Create an .ipa archive"
    task "archive" do
      invoke_rake 'ios', 'archive'
    end
    desc "Create an .ipa archive for distribution (AppStore)"
    task "archive:distribution" do
      invoke_rake 'ios', 'archive:distribution'
    end
    desc "Build everything"
    task "build" do
      invoke_rake 'ios', 'build'
    end
    desc "Build the device version"
    task "build:device" do
      invoke_rake 'ios', 'build:device'
    end
{'fraction_non_alphanumeric': 0.14430072756669363, 'fraction_numerical': 0.0008084074373484236, 'mean_word_length': 3.282006920415225, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5959663', 'n_tokens_mistral': 781, 'n_tokens_neox': 768, 'n_words': 225}