4ba149bef9
Closes #10088. Signed-off-by: Tomasz Pajor <tomek@polishgeeks.com>
44 lines
1 KiB
Ruby
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.934/kobalt-0.934.zip"
|
|
sha256 "bc9c2a8e6293c60d26d1f16d26087c0e6a1448a6632c7ae3aedb3381c87caa59"
|
|
|
|
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
|