This repository has been archived by the owner on Jan 16, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Kobalt 0.633 (new formula) #49392
Closed
Closed
Kobalt 0.633 (new formula) #49392
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 | ||
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" | ||
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.exist?(output), "Couldn't find #{output}" | ||
end | ||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🆒