1fd41f43eb
Set up the toolchain to create sources and javadocs artifacts in addition to JARs created during the build. Use Buck build tool for that: [1]. This is a fork of Google's build tool Blaze, created by Xooglers at Facebook. This build tool (like Blaze itself) uses Python to write build files. Add needed tools and build files to install LibreOffice API artifacts to local Maven repository or deploy them to Maven Central. To build all needed artifacts LibreOffice must be built regularly with GNU make first. To build the rest of the API (sources and javadocs): $> buck build api To replace version number with upcoming release version: $> solenv/bin/version.py 5.1.0 To install the API to local Maven repository: $> buck build api_install To deploy the API to Maven Central: $> buck build api_deploy Detailed documentation is added to document the prerequisites and the workflow to upload LibreOffice API to Maven Central. * [1] https://buckbuild.com Change-Id: Ibdd552a01110836703bc069abe829b9921491cac Reviewed-on: https://gerrit.libreoffice.org/20343 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
28 lines
712 B
Text
28 lines
712 B
Text
def maven_package(
|
|
version,
|
|
repository = None,
|
|
url = None,
|
|
jar = {},
|
|
src = {},
|
|
doc = {}):
|
|
cmd = ['$(exe //solenv/maven:mvn)', '-v', version, '-o', '$OUT']
|
|
api_cmd = []
|
|
for type,d in [('jar', jar), ('java-source', src), ('javadoc', doc)]:
|
|
for a,t in d.iteritems():
|
|
api_cmd.append('-s %s:%s:$(location %s)' % (a,type,t))
|
|
|
|
genrule(
|
|
name = 'api_install',
|
|
cmd = ' '.join(cmd + api_cmd + ['-a', 'install']),
|
|
out = 'api_install.info',
|
|
)
|
|
|
|
if repository and url:
|
|
genrule(
|
|
name = 'api_deploy',
|
|
cmd = ' '.join(cmd + api_cmd + [
|
|
'-a', 'deploy',
|
|
'--repository', repository,
|
|
'--url', url]),
|
|
out = 'api_deploy.info',
|
|
)
|