view Rakefile @ 1:fac1b8f35265

Applet.
author Mikhail Kryshen <mikhail@kryshen.net>
date Sat, 14 Jul 2012 06:32:31 +0400
parents 91ecd24948de
children 6e6b00d95d0b
line wrap: on
line source

require 'mirah'
require 'ant'
require 'rake/clean'

SRC = FileList['src/**/*.mirah']

CLEAN.include 'build/**/*.class'
CLEAN.include 'dist/*.jar'

task :default => [:compile]

task :compile => SRC do
  Mirah::compile '--jvm', '1.6', '-d', 'build', *SRC
end

task :run => [:compile] do
  sh 'java -cp build:res net/kryshen/charamega/Ui'
end

task :jar => [:compile] do
  ant.jar :jarfile => 'dist/charamega.jar' do
    fileset :dir => 'build'
    fileset :dir => 'res'
    manifest do
      attribute :name => 'Main-Class', :value => 'net.kryshen.charamega.Ui'
    end
  end
end