Created
December 1, 2011 18:34
-
-
Save aboisvert/1418828 to your computer and use it in GitHub Desktop.
Buidlr plugin for the ScalaCL plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Buildr plugin to compile Scala code with the ScalaCL plugin. | |
# http://code.google.com/p/scalacl/wiki/ScalaCLPlugin | |
# | |
# To use, | |
# 1) add "require 'scala_cl'" to your buildfile | |
# 2) add "extend Buildr::ScalaCL" to your project definition | |
# | |
# Copyright (C) 2011 by Alex Boisvert | |
# | |
# Licensed under the Apache Software License v2.0 | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
repositories.remote << "http://nativelibs4java.sourceforge.net/maven/" | |
module Buildr | |
module ScalaCL | |
include Extension | |
VERSION = Buildr.settings.build['scalacl.version'] || "0.2" | |
LIB = "com.nativelibs4java:scalacl:jar:#{VERSION}" | |
PLUGIN = "com.nativelibs4java:scalacl-compiler-plugin:jar:#{VERSION}" | |
after_define(:scalacl => :compile) do |project| | |
project.compile.enhance Buildr.artifacts(LIB, PLUGIN) | |
project.compile.using :other => Array(project.compile.options[:other]) + | |
["-Xplugin:#{Buildr.artifact(PLUGIN)}"] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment