[Libreoffice-commits] core.git: bean/BUCK BUCK javaunohelper/BUCK jurt/BUCK ridljar/BUCK ridljar/source solenv/bin solenv/buck solenv/maven
Rene Engelhard (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 30 10:28:22 UTC 2020
BUCK | 9 +++++++++
bean/BUCK | 5 ++---
javaunohelper/BUCK | 27 ++++++++++++++-------------
jurt/BUCK | 28 +++++++++++++++-------------
ridljar/BUCK | 34 ++++++++++++++++++++++++++++++----
ridljar/source/unoloader/BUCK | 1 +
solenv/bin/version.py | 3 ++-
solenv/buck/build.defs | 2 ++
solenv/maven/BUCK | 3 +++
solenv/maven/mvn.py | 1 +
10 files changed, 79 insertions(+), 34 deletions(-)
New commits:
commit ea8d6cd59670854cb153c4e984cb4044093e5994
Author: Rene Engelhard <rene at debian.org>
AuthorDate: Fri May 8 14:19:45 2020 +0200
Commit: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Mon Nov 30 11:27:47 2020 +0100
Adapt buck build to jars merged into libreoffice.jar
Since ae855bf48163ff64d94cfc34aff8e37abdb5518d and
35518c92365cc183ba6cce2a4d284a130c0ca13f the ridl,jurt und unoil jars
were merged into libreoffice.jar. Adapt the buck build correspondingly.
Preserve the publishing of merged jars for now with dummy content and
consider to remove them in future releases.
Test Plan:
1. To replace version number with upcoming release version:
$ solenv/bin/version.py 7.1.0
2. To install the API to local Maven repository:
$ VERBOSE=1 buck build api_install
3. To deploy the API to Maven Central:
$ VERBOSE=1 buck build api_deploy
Change-Id: Id1b2135682ab962c901b944f3c26aeead9a4b19b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93724
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/BUCK b/BUCK
index 66b0dbdabcec..18f5cf488e4f 100644
--- a/BUCK
+++ b/BUCK
@@ -34,6 +34,12 @@ prebuilt_jar(
visibility = ['PUBLIC'],
)
+prebuilt_jar(
+ name = 'libreoffice',
+ binary_jar = 'instdir/program/classes/libreoffice.jar',
+ visibility = ['PUBLIC'],
+)
+
zip_file(
name = 'api',
srcs = [
@@ -55,5 +61,8 @@ zip_file(
':unoloader',
'//ridljar/source/unoloader:unoloader-src',
'//ridljar/source/unoloader:unoloader-javadoc',
+ ':libreoffice',
+ '//ridljar:libreoffice-src',
+ '//ridljar:libreoffice-javadoc',
]
)
diff --git a/bean/BUCK b/bean/BUCK
index 94a235b0a87a..0a0ac72b60ea 100644
--- a/bean/BUCK
+++ b/bean/BUCK
@@ -2,6 +2,7 @@
java_sources(
name = 'officebean-src',
srcs = glob(['com/**']),
+ root = '.',
visibility = ['PUBLIC'],
)
@@ -14,10 +15,8 @@ java_doc(
paths = ['.'],
srcs = glob(['com/**']),
deps = [
- '//:juh',
+ '//:libreoffice',
'//:officebean',
- '//:unoil',
- '//:ridl',
],
visibility = ['PUBLIC'],
)
diff --git a/javaunohelper/BUCK b/javaunohelper/BUCK
index 7f1120dab5f5..a33df7b9d347 100644
--- a/javaunohelper/BUCK
+++ b/javaunohelper/BUCK
@@ -1,20 +1,21 @@
-
-java_sources(
+genrule(
name = 'juh-src',
- srcs = glob(['com/**']),
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE SOURCE ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'juh-src.jar',
visibility = ['PUBLIC'],
)
-java_doc(
+genrule(
name = 'juh-javadoc',
- title = 'LibreOffice Makes it easier to use UNO with Java',
- pkgs = [
- 'com.sun.star',
- ],
- paths = ['.'],
- srcs = glob(['com/**']),
- deps = [
- '//:juh',
- ],
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE JAVADOC ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'juh-javadoc.jar',
visibility = ['PUBLIC'],
)
diff --git a/jurt/BUCK b/jurt/BUCK
index f2349aa017e0..1af7706d9203 100644
--- a/jurt/BUCK
+++ b/jurt/BUCK
@@ -1,21 +1,23 @@
-java_sources(
+genrule(
name = 'jurt-src',
- srcs = glob(['com/**']),
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE SOURCE ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'jurt-src.jar',
visibility = ['PUBLIC'],
)
-java_doc(
+genrule(
name = 'jurt-javadoc',
- title = 'LibreOffice Java Uno Runtime',
- pkgs = [
- 'com.sun.star',
- ],
- paths = ['.'],
- srcs = glob(['com/**']),
- deps = [
- '//:jurt',
- '//:unoloader',
- ],
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE JAVADOC ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'jurt-javadoc.jar',
visibility = ['PUBLIC'],
)
+
diff --git a/ridljar/BUCK b/ridljar/BUCK
index 382287d09ff9..b67d1c6a1166 100644
--- a/ridljar/BUCK
+++ b/ridljar/BUCK
@@ -1,20 +1,46 @@
-java_sources(
+genrule(
name = 'ridl-src',
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE SOURCE ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'ridl-src.jar',
+ visibility = ['PUBLIC'],
+)
+
+genrule(
+ name = 'ridl-javadoc',
+ cmd = ' && '.join([
+ 'cd $TMP',
+ 'echo "FAKE JAVADOC ARCHIVE" > README',
+ 'zip -qr $OUT *',
+ ]),
+ out = 'ridl-javadoc.jar',
+ visibility = ['PUBLIC'],
+)
+
+java_sources(
+ name = 'libreoffice-src',
srcs = glob(['com/**']),
+ root = '.',
visibility = ['PUBLIC'],
)
java_doc(
- name = 'ridl-javadoc',
+ name = 'libreoffice-javadoc',
title = 'LibreOffice types for the Java Uno typesystem',
pkgs = [
- 'com.sun.star',
+ 'com.sun.star.comp',
+ 'com.sun.star.lib',
+ 'com.sun.star.uno',
],
paths = ['.'],
srcs = glob(['com/**']),
deps = [
- '//:ridl',
+ '//:unoloader',
+ '//:libreoffice',
],
visibility = ['PUBLIC'],
)
diff --git a/ridljar/source/unoloader/BUCK b/ridljar/source/unoloader/BUCK
index 26781304f906..1c2b20f0622c 100644
--- a/ridljar/source/unoloader/BUCK
+++ b/ridljar/source/unoloader/BUCK
@@ -2,6 +2,7 @@
java_sources(
name = 'unoloader-src',
srcs = glob(['com/**']),
+ root = '.',
visibility = ['PUBLIC'],
)
diff --git a/solenv/bin/version.py b/solenv/bin/version.py
index b1164483f660..3193b3fa39f1 100755
--- a/solenv/bin/version.py
+++ b/solenv/bin/version.py
@@ -12,6 +12,7 @@ M = {
'ridl': 'ridljar',
'unoil': 'unoil',
'unoloader': 'ridljar',
+ 'libreoffice': 'ridljar',
}
parser = OptionParser()
@@ -40,7 +41,7 @@ def replace_in_file(filename, src_pattern):
src_pattern = re.compile(r'^(\s*<version>)([-.@\w]+)(</version>\s*)$',
re.MULTILINE)
-for a in ['juh', 'jurt', 'officebean', 'ridl', 'unoil', 'unoloader']:
+for a in ['juh', 'jurt', 'libreoffice', 'officebean', 'ridl', 'unoil', 'unoloader']:
replace_in_file(os.path.join(M[a], 'pom.%s.xml' % a), src_pattern)
src_pattern = re.compile(r"^(LIBREOFFICE_VERSION = ')([-.@\w]+)(')$",
diff --git a/solenv/buck/build.defs b/solenv/buck/build.defs
index b7b81ec8cb3c..f6a1a7463b94 100644
--- a/solenv/buck/build.defs
+++ b/solenv/buck/build.defs
@@ -1,11 +1,13 @@
def java_sources(
name,
srcs,
+ root = None,
visibility = []
):
java_library(
name = name,
resources = srcs,
+ resources_root = root,
visibility = visibility,
)
diff --git a/solenv/maven/BUCK b/solenv/maven/BUCK
index f5bca38be2a3..fd1252df0c37 100644
--- a/solenv/maven/BUCK
+++ b/solenv/maven/BUCK
@@ -16,6 +16,7 @@ maven_package(
'ridl': '//:ridl',
'unoil': '//:unoil',
'unoloader': '//:unoloader',
+ 'libreoffice': '//:libreoffice',
},
src = {
'juh': '//javaunohelper:juh-src',
@@ -24,6 +25,7 @@ maven_package(
'ridl': '//ridljar:ridl-src',
'unoil': '//unoil:unoil-src',
'unoloader': '//ridljar/source/unoloader:unoloader-src',
+ 'libreoffice': '//ridljar:libreoffice-src',
},
doc = {
'juh': '//javaunohelper:juh-javadoc',
@@ -32,6 +34,7 @@ maven_package(
'ridl': '//ridljar:ridl-javadoc',
'unoil': '//unoil:unoil-javadoc',
'unoloader': '//ridljar/source/unoloader:unoloader-javadoc',
+ 'libreoffice': '//ridljar:libreoffice-javadoc',
},
)
diff --git a/solenv/maven/mvn.py b/solenv/maven/mvn.py
index caa15eeb9fd8..5b45447daa07 100755
--- a/solenv/maven/mvn.py
+++ b/solenv/maven/mvn.py
@@ -18,6 +18,7 @@ M = {
'ridl': 'ridljar',
'unoil': 'unoil',
'unoloader': 'ridljar',
+ 'libreoffice': 'ridljar',
}
opts = OptionParser()
More information about the Libreoffice-commits
mailing list