homebrew-core/Formula/kobalt.rb
ilovezfs 5a33713efd kobalt 0.929
Closes #9946.

Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
2017-02-14 12:38:47 +01:00

44 lines
1 KiB
Ruby

class Kobalt < Formula
desc "Build system"
homepage "http://beust.com/kobalt"
url "https://github.com/cbeust/kobalt/releases/download/0.929/kobalt-0.929.zip"
sha256 "43f1429b9e875e1f314f1bd39308285b39e4aaf42cc2d655823a548cf7854c99"
bottle :unneeded
def install
libexec.install %w[kobalt]
(bin/"kobaltw").write <<-EOS.undent
#!/bin/bash
java -jar #{libexec}/kobalt/wrapper/kobalt-wrapper.jar $*
EOS
end
test do
ENV.java_cache
(testpath/"src/main/kotlin/com/A.kt").write <<-EOS.undent
package com
class A
EOS
(testpath/"kobalt/src/Build.kt").write <<-EOS.undent
import com.beust.kobalt.*
import com.beust.kobalt.api.*
import com.beust.kobalt.plugin.packaging.*
val p = project {
name = "test"
version = "1.0"
assemble {
jar {}
}
}
EOS
system "#{bin}/kobaltw", "assemble"
output = "kobaltBuild/libs/test-1.0.jar"
assert File.exist?(output), "Couldn't find #{output}"
end
end