-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Kobalt 0.633 (new formula) #49392
Kobalt 0.633 (new formula) #49392
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
class Kobalt < Formula | ||
desc "Build system" | ||
homepage "http://beust.com/kobalt" | ||
url "https://github.com/cbeust/kobalt/releases/download/0.633/kobalt-0.633.zip" | ||
sha256 "bb468a7b8761de20c4700e18a6de55ee0712edd0e9d04748e53592c91389c94e" | ||
|
||
def install | ||
libexec.install %w[kobaltw kobalt] | ||
kobaltw = libexec/"kobaltw" | ||
kobaltw.chmod 0755 | ||
bin.write_exec_script kobaltw | ||
end | ||
|
||
test do | ||
(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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is trying to write to the wrong $HOME: http://bot.brew.sh/job/Homebrew%20Pull%20Requests/42192/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/test_kobalt/ Add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
output = "kobaltBuild/libs/test-1.0.jar" | ||
assert File.exists?(output), "Couldn't find #{output}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw this URL: we need to build from source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying that when someone installs Kobalt, you will build it from the source and then install the resulting binaries? (sorry if it's a silly question, I'm not very familiar with Homebrew's internals)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The exception we make is if this is Java code; it's OK for us to not build from source there because the "binaries" work cross-platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kobalt is written in Kotlin actually but same thing: the zip file contains a jar which is cross platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒