Comments (15)
π
from buck.
Actually it is already solved as reusable building blocks: bucklets [1]. Just pull and include it in your repository as git submodule. Working example provided [2].
[1] https://gerrit-review.googlesource.com/#/admin/projects/bucklets
[2] https://gerrit-review.googlesource.com/#/admin/projects/gitiles
from buck.
Awesome. Thanks!
from buck.
@davido Do you know if there's a way to pull the jar with dependencies? It seems like I have to hard code the dependencies as they're not read in from the pom.
from buck.
@bootstraponline transitive dependencies currently not supported in buckles.
from buck.
How about an external tool that would download the dependencies (transitively) based on some manifest file and generate a BUCK file filled with prebuilt_jar
?
That tool could be implemented with either Γther or Ivy (or Gradle!), and could possibly share the download cache with, say, Maven (~/.m2/repository/
) or Gradle (~/.gradle/caches
).
Having it built-in though, Buck could possibly cache the downloaded artifacts in a distributed cache (I have no idea whether and how it could also cache the transitive dependencies without having them specifically hand-written in the BUCK files)
See http://blog.ltgt.net/in-quest-of-the-ultimate-build-tool/
from buck.
Well, i am not a big fun of transitive dependencies. Currently we hard code them in maven_jar()
:
maven_jar(
name = 'gwt-dev',
id = 'com.google.gwt:gwt-dev:' + VERSION,
sha1 = 'af3d9ad2fb8be30dc87fdcd6d9a373b2ab675802',
license = 'Apache2.0',
deps = [
':javax-validation',
':javax-validation_src',
],
attach_source = False,
exclude = ['org/eclipse/jetty/*'],
)
maven_jar(
name = 'javax-validation',
id = 'javax.validation:validation-api:1.0.0.GA',
bin_sha1 = 'b6bd7f9d78f6fdaa3c37dae18a4bd298915f328e',
src_sha1 = '7a561191db2203550fbfa40d534d4997624cd369',
license = 'Apache2.0',
visibility = [],
)
Current implementation of maven_jar()
[1] is using download_file.py
[2] where we can do something funny, like:
- strip parts from the Maven artifact. This is needed, because recent GWT is shipping old version of Jetty container (8.x) that collides with the version shipped with Gerrit master (9.1):
[...]
exclude = ['org/eclipse/jetty/*'],
[...]
- strip JAR signing stuff, note
unsign = True
:
maven_jar(
name = 'jgit',
id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
bin_sha1 = '421e66466c7946b8f5e5a841297fe44d2071ab88',
src_sha1 = '281dd1817e53814ee055e346d572f687688a8463',
license = 'jgit',
repository = REPO,
unsign = True,
deps = [':ewah'],
)
And as you pointed out, we use already directory cache in Buck, but could easily set up distributed cache instead.
[1] https://gerrit.googlesource.com/bucklets/+/master/maven_jar.bucklet
[2] https://gerrit.googlesource.com/bucklets/+/master/tools/download_file.py
from buck.
π for having reusable bucklets library, including maven_jar
for instance.
from buck.
Well, that's not me. That was extracted from Gerrit Code Review project. So if you would like to say "Thank you guys for having reusable bucklets library, including maven_jar", the right place to do that is this forum: [1] ;-)
[1] https://groups.google.com/forum/#!forum/repo-discuss
from buck.
I think this issue is about getting maven into the core buck project.
On Aug 19, 2014 8:35 AM, "David Ostrovsky" [email protected] wrote:
Well, that's not me. That was extracted from Gerrit Code Review project.
So if you would like to say "Thank you guys for having reusable bucklets
library, including maven_jar", the right place to do that is this forum:
[1] ;-)[1] https://groups.google.com/forum/#!forum/repo-discuss
β
Reply to this email directly or view it on GitHub
#64 (comment).
from buck.
Not necessarily. It depends how and if Bucklets are integrated in Buck core. Let's assume, that Bucklets are natively supported by Buck as discussed in this thread: [1].
So that you can say in .bucklets
file in your project:
[bucklet]
gerrit:maven_jar:1.0
[repository]
gerrit = https://gerrit.googlesource.com/bucklets
And you are done: you can now include maven_jar() rule in your BUCK files and it just works.
[1] https://groups.google.com/d/topic/buck-build/VIgYyJKn088/discussion
from buck.
Yes, that's what I meant. Native support for bucklets. It's not clear if
this will ever happen though.
On Aug 19, 2014 9:18 AM, "David Ostrovsky" [email protected] wrote:
Not necessarily. It depends how and if Bucklets are integrated in Buck
core. Let's assume, that Bucklets are natively supported by Buck as
discussed in this thread: [1].So that you can say in .bucklets file in your project:
[bucklet]
gerrit:maven_jar:1.0[repository]
gerrit = https://gerrit.googlesource.com/buckletsAnd you are done: you can now include maven_jar() rule in your BUCK files
and it just works.[1] https://groups.google.com/d/topic/buck-build/VIgYyJKn088/discussion
β
Reply to this email directly or view it on GitHub
#64 (comment).
from buck.
We are almost there. 9735ae8 added remote_file()
rule to Buck:
#maven_jar(
# name = 'httpmime',
# id = 'org.apache.httpcomponents:httpmime:4.3.4',
# bin_sha1 = '54ffde537682aea984c22fbcf0106f21397c5f9b',
# src_sha1 = '0651e21152b0963661068f948d84ed08c18094f8',
# license = 'Apache2.0',
#)
prebuilt_jar(
name = 'httpmime',
binary_jar = ':httpmime-jar',
source_jar = ':httpmime-src',
)
remote_file(
name = 'httpmime-jar',
sha1 = '54ffde537682aea984c22fbcf0106f21397c5f9b',
url = 'mvn:org.apache.httpcomponents:httpmime:jar:4.3.4',
out = 'httpmime.jar',
)
remote_file(
name = 'httpmime-src',
sha1 = '0651e21152b0963661068f948d84ed08c18094f8',
url = 'mvn:org.apache.httpcomponents:httpmime:src:4.3.4',
out = 'httpmime-src.jar',
)
For some reasons it doesn't work: #192
from buck.
3afdcbd added a buck fetch
command. Are we good here now?
from buck.
Indeed, 3afdcbd fixed it.
from buck.
Related Issues (20)
- Python 3.10: third-party python modules need update (setuptools: No module named 'symbol', pex: cannot import name 'iterable' from 'collections') HOT 10
- How to Change Xcode xxx.pbxproj resource-id prefix οΌ
- got OSError: [Errno 45] Operation not supported when run "buck build demo_app_ios" command
- Trying to generate multiple targets with buck project --combined-project, expecting one project, got many
- GCC Toolchain Path Incorrect Post R22 NDK HOT 4
- Invite to slack channel
- How to avoid or allow apple security in M1?
- How do I join slack?
- Jitpack failure
- zip64 self executing jar issue
- Accessing files across directories
- Cannot run a build, failed to initialize buck (sqlite-jdbc) HOT 2
- Unable to build buck. Java class file version error. HOT 3
- Windows,When building rule //src/com/facebook/buck/jvm/java/abi/kotlin:kotlin.
- [Question] Isolation level between test targets within the same project. HOT 1
- Unable to create abi jar
- buck fetch fails with symbolic links in an archive HOT 1
- State of the Project? HOT 2
- Buck fails to link, linkage order seems to be wrong in linker.argsfile HOT 1
- How can we build instant app using buck
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buck.