fd6bb9f6a5
Implement a new build system using Buck[1], Facebook's open source clone of Google's internal build system. Pros: - Concise build language - Test and build output is concise - Test failures and stack traces show on terminal - Reliable incrementals; clean is unnecessary - Extensible with simple blocks of Python - Fast buck: clean: 0.452s, full 1m21.083s [*], no-op: 7.145s, mvn: clean: 4.596s, full 2m53.776s, no-op: 59.108s, [*] full build includes downloading all dependencies, time can vary due to remote server performance. Cons: - No Windows support - No native Maven Central support (added by macros) - No native GWT, Prolog, or WAR support (added by macros) - Bootstrap of buck requires Ant Getting started: git clone https://gerrit.googlesource.com/buck cd buck ant Mac OS X: PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH" Linux: PATH="`pwd`/bin:$PATH" Importing into Eclipse: $ time buck build :eclipse 0m48.949s Import existing project from `pwd` Import 'gerrit' (do not import other Maven based projects) Expand 'gerrit' Right click 'buck-out' > Properties Under Attributes check 'Derived' If the code doesn't currently compile but an updated classpath is needed, refresh the configs and obtain missing JARs: $ buck build :eclipse_project :download Running JUnit tests: $ time buck test --all -e slow # skip slow tests 0m19.320s $ time buck test --all # includes acceptance tests 5m17.517s Building WAR: $ buck build :gerrit $ java -jar buck-out/gen/gerrit.war Building release: $ buck test --all && buck build :api :release $ java -jar buck-out/gen/release.war $ ls -lh buck-out/gen/{extension,plugin}-api.jar Downloading dependencies: Dependencies are normally downloaded automatically, but Buck can inspect its graph and download missing dependencies so future compiles can run without the network: $ buck build :download [1] http://facebook.github.io/buck/ Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655
250 lines
5.7 KiB
Python
250 lines
5.7 KiB
Python
include_defs('//lib/maven.defs')
|
|
|
|
define_license(name = 'Apache1.1')
|
|
define_license(name = 'Apache2.0')
|
|
define_license(name = 'MPL1.1')
|
|
define_license(name = 'PublicDomain')
|
|
define_license(name = 'antlr')
|
|
define_license(name = 'args4j')
|
|
define_license(name = 'automaton')
|
|
define_license(name = 'bouncycastle')
|
|
define_license(name = 'clippy')
|
|
define_license(name = 'h2')
|
|
define_license(name = 'jgit')
|
|
define_license(name = 'jsch')
|
|
define_license(name = 'jsr305')
|
|
define_license(name = 'ow2')
|
|
define_license(name = 'postgresql')
|
|
define_license(name = 'prologcafe')
|
|
define_license(name = 'slf4j')
|
|
define_license(name = 'DO_NOT_DISTRIBUTE')
|
|
|
|
maven_jar(
|
|
name = 'gwtorm',
|
|
id = 'gwtorm:gwtorm:1.6',
|
|
bin_sha1 = '61bcb92f438524260429149910b5261d48812419',
|
|
src_sha1 = '2624f9d6a750a8aa8f9a5d4b5062b70cd12d1ae7',
|
|
license = 'Apache2.0',
|
|
repository = GERRIT,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'gwtjsonrpc',
|
|
id = 'gwtjsonrpc:gwtjsonrpc:1.3',
|
|
bin_sha1 = '1717ba11ab0c5160798c80085220a63f864691d3',
|
|
src_sha1 = '9e01c5d7bd54f8e70066450b372a43c16404789e',
|
|
license = 'Apache2.0',
|
|
repository = GERRIT,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'gson',
|
|
id = 'com.google.code.gson:gson:2.1',
|
|
sha1 = '2e66da15851f9f5b5079228f856c2f090ba98c38',
|
|
license = 'Apache2.0',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'guava',
|
|
id = 'com.google.guava:guava:14.0',
|
|
sha1 = '67b7be4ee7ba48e4828a42d6d5069761186d4a53',
|
|
license = 'Apache2.0',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'asm3',
|
|
id = 'asm:asm:3.2',
|
|
sha1 = '9bc1511dec6adf302991ced13303e4140fdf9ab7',
|
|
license = 'ow2',
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'ow2-asm',
|
|
id = 'org.ow2.asm:asm:4.0',
|
|
sha1 = '659add6efc75a4715d738e73f07505246edf4d66',
|
|
license = 'ow2',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'ow2-asm-analysis',
|
|
id = 'org.ow2.asm:asm-analysis:4.0',
|
|
sha1 = '1c45d52b6f6c638db13cf3ac12adeb56b254cdd7',
|
|
license = 'ow2',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'ow2-asm-tree',
|
|
id = 'org.ow2.asm:asm-tree:4.0',
|
|
sha1 = '67bd266cd17adcee486b76952ece4cc85fe248b8',
|
|
license = 'ow2',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'ow2-asm-util',
|
|
id = 'org.ow2.asm:asm-util:4.0',
|
|
sha1 = 'd7a65f54cda284f9706a750c23d64830bb740c39',
|
|
license = 'ow2',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'velocity',
|
|
id = 'org.apache.velocity:velocity:1.6.4',
|
|
sha1 = 'fcc58693dd8fc83d714fba149789be37cc19b66d',
|
|
license = 'Apache2.0',
|
|
deps = [
|
|
'//lib/commons:collections',
|
|
'//lib/commons:lang',
|
|
'//lib/commons:oro',
|
|
],
|
|
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'jsch',
|
|
id = 'com.jcraft:jsch:0.1.44-1',
|
|
sha1 = '2e9ae08de5a71bd0e0d3ba2558598181bfa71d4e',
|
|
license = 'jsch',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'servlet-api-3_0',
|
|
id = 'org.apache.tomcat:tomcat-servlet-api:7.0.32',
|
|
sha1 = 'e2f21e9868414122e6dd23ac66cf304d4290642c',
|
|
license = 'Apache2.0',
|
|
exclude = ['META-INF/NOTICE', 'META-INF/LICENSE'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'jsr305',
|
|
id = 'com.google.code.findbugs:jsr305:1.3.9',
|
|
sha1 = '40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf',
|
|
license = 'jsr305',
|
|
attach_source = False,
|
|
exclude_java_sources = True,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'args4j',
|
|
id = 'args4j:args4j:2.0.16',
|
|
sha1 = '9f00fb12820743b9e05c686eba543d64dd43f2b1',
|
|
license = 'args4j',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'mime-util',
|
|
id = 'eu.medsea.mimeutil:mime-util:2.1.3',
|
|
sha1 = '0c9cfae15c74f62491d4f28def0dff1dabe52a47',
|
|
license = 'Apache2.0',
|
|
exclude = ['LICENSE.txt', 'README.txt'],
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'juniversalchardet',
|
|
id = 'com.googlecode.juniversalchardet:juniversalchardet:1.0.3',
|
|
sha1 = 'cd49678784c46aa8789c060538e0154013bb421b',
|
|
license = 'MPL1.1',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'automaton',
|
|
id = 'dk.brics.automaton:automaton:1.11-8',
|
|
sha1 = '6ebfa65eb431ff4b715a23be7a750cbc4cc96d0f',
|
|
license = 'automaton',
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'pegdown',
|
|
id = 'org.pegdown:pegdown:1.1.0',
|
|
sha1 = '00bcc0c5b025b09ab85bb80a8311ce5c015d005b',
|
|
license = 'Apache2.0',
|
|
deps = [':parboiled-java'],
|
|
exclude = ['META-INF/LICENSE', 'META-INF/NOTICE'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'parboiled-core',
|
|
id = 'org.parboiled:parboiled-core:1.1.3',
|
|
sha1 = '3fc3013adf98701efcc594a1ea99a3f841dc81bb',
|
|
license = 'Apache2.0',
|
|
attach_source = False,
|
|
visibility = [],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'parboiled-java',
|
|
id = 'org.parboiled:parboiled-java:1.1.3',
|
|
sha1 = 'c2bf2935a8b3eca5f998557190cd6eb34f5536d0',
|
|
license = 'Apache2.0',
|
|
deps = [
|
|
':parboiled-core',
|
|
':ow2-asm-tree',
|
|
':ow2-asm-analysis',
|
|
':ow2-asm-util',
|
|
],
|
|
attach_source = False,
|
|
visibility = [],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'h2',
|
|
id = 'com.h2database:h2:1.3.168',
|
|
sha1 = 'eb32936a239d95220f5b2d2973a7b17372f98b54',
|
|
license = 'h2',
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'postgresql',
|
|
id = 'postgresql:postgresql:9.1-901-1.jdbc4',
|
|
sha1 = '9bfabe48876ec38f6cbaa6931bad05c64a9ea942',
|
|
license = 'postgresql',
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'junit',
|
|
id = 'junit:junit:4.11',
|
|
sha1 = '4e031bb61df09069aeb2bffb4019e7a5034a4ee0',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
deps = [':hamcrest-core'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'hamcrest-core',
|
|
id = 'org.hamcrest:hamcrest-core:1.3',
|
|
sha1 = '42a25dc3219429f0e5d060061f71acb49bf010a0',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
visibility = ['//lib:junit'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'easymock',
|
|
id = 'org.easymock:easymock:3.1',
|
|
sha1 = '3e127311a86fc2e8f550ef8ee4abe094bbcf7e7e',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
deps = [
|
|
':cglib-2_2',
|
|
':objenesis',
|
|
],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'cglib-2_2',
|
|
id = 'cglib:cglib-nodep:2.2.2',
|
|
sha1 = '00d456bb230c70c0b95c76fb28e429d42f275941',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
visibility = ['//lib:easymock'],
|
|
attach_source = False,
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'objenesis',
|
|
id = 'org.objenesis:objenesis:1.2',
|
|
sha1 = 'bfcb0539a071a4c5a30690388903ac48c0667f2a',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
visibility = ['//lib:easymock'],
|
|
attach_source = False,
|
|
)
|