Mercurial > hg > charamega
view Rakefile @ 11:27996848b621
Added tag 1 for changeset 6e6b00d95d0b
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Tue, 17 Jul 2012 07:18:12 +0400 |
parents | 6e6b00d95d0b |
children | 6e272c520bc6 |
line wrap: on
line source
require 'mirah' require 'ant' require 'rake/clean' SRC = FileList['src/**/*.mirah'] CLEAN.include 'build/**/*.class' CLEAN.include 'build/**/version.properties' CLEAN.include 'dist/*.jar' task :default => [:compile] task :compile => SRC do Mirah::compile '--jvm', '1.6', '-d', 'build', *SRC version = `hg log -r tip --template "{latesttag}.{latesttagdistance}"` File.open('build/net/kryshen/charamega/version.properties', 'w') do |f| f.write "version = #{version}\n" end 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