[Libreoffice-commits] online.git: android/app android/lib loleaflet/Makefile.am
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 21 21:43:33 UTC 2020
android/app/build.gradle | 3 +--
android/lib/build.gradle | 14 +++++++++++++-
android/lib/libSettings.gradle.in | 1 +
loleaflet/Makefile.am | 1 -
4 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit e3b0c057331aa9e6c0f8e1ca5eebc6ca41b60a24
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Apr 21 17:23:59 2020 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Tue Apr 21 23:43:15 2020 +0200
android: add gradle task copyBrandTheme
Change-Id: Ide4a58551fad9befe3e81ab727be283e438dcae3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92661
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/android/app/build.gradle b/android/app/build.gradle
index a7218c635..ab9944d89 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -77,7 +77,6 @@ dependencies {
task copyBrandFiles(type: Copy) {
from "${liboBrandingDir}/android"
into "src/main/res"
- println 'copy files done'
}
task build_loleaflet(type: Exec) {
@@ -86,7 +85,7 @@ task build_loleaflet(type: Exec) {
afterEvaluate {
if (!project.ext.liboHasBranding.equals("true") || !file("${liboBrandingDir}").exists()) {
- copyBrandFiles.enabled = false;
+ copyBrandFiles.enabled = false
}
preBuild.dependsOn copyBrandFiles, build_loleaflet
diff --git a/android/lib/build.gradle b/android/lib/build.gradle
index 94d695190..94c505d42 100644
--- a/android/lib/build.gradle
+++ b/android/lib/build.gradle
@@ -181,6 +181,11 @@ task createFullConfig(type: Copy) {
}
}
+task copyBrandTheme(type: Copy) {
+ from "${liboBrandingDir}/online-theme"
+ into "src/main/assets/share/theme_definitions/online"
+}
+
task createStrippedConfig {
def preserveDir = file("src/main/assets/share/config/soffice.cfg/empty")
outputs.dir "src/main/assets/share/registry/res"
@@ -273,4 +278,11 @@ ReferenceOOoMajorMinor=4.1
// creating the UI stuff is cheap, don't bother only applying it for the flavor..
preBuild.dependsOn 'createRCfiles',
- 'createFullConfig'
+ 'createFullConfig',
+ 'copyBrandTheme'
+
+afterEvaluate {
+ if (!file("${liboBrandingDir}").exists()) {
+ copyBrandTheme.enabled = false
+ }
+}
diff --git a/android/lib/libSettings.gradle.in b/android/lib/libSettings.gradle.in
index 9bcd1b58b..afa68ee1f 100644
--- a/android/lib/libSettings.gradle.in
+++ b/android/lib/libSettings.gradle.in
@@ -10,6 +10,7 @@ ext {
liboVersionMinor = '@LOOLWSD_VERSION_MAJOR@'
liboGitFullCommit = '@LOOLWSD_VERSION_HASH@'
liboApplicationId = '@ANDROID_PACKAGE_NAME@'
+ liboBrandingDir = '@APP_BRANDING_DIR@'
liboAndroidAbi = '@ANDROID_ABI@'
liboGooglePlay = '@APP_GOOGLE_PLAY@'
}
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index a7466742f..ceb3419d7 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -338,7 +338,6 @@ if ENABLE_ANDROIDAPP
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/branding.css" "$(APP_BRANDING_DIR)/branding.js" $(abs_top_srcdir)/android/lib/src/main/assets/dist/ ; else touch $(abs_top_srcdir)/android/lib/src/main/assets/dist/branding.css ; fi
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)"/images/*.svg $(abs_top_srcdir)/android/lib/src/main/assets/dist/images/ ; fi
@if test -d "$(APP_BRANDING_DIR)" ; then cp -a "$(APP_BRANDING_DIR)/images/toolbar-bg-logo.svg" $(abs_top_srcdir)/android/lib/src/main/assets/dist/images/toolbar-bg.svg ; fi
- @if test -d "$(APP_BRANDING_DIR)/online-theme" ; then mkdir -p $(abs_top_srcdir)/android/lib/src/main/assets/share/theme_definitions ; cp -a "$(APP_BRANDING_DIR)/online-theme" "$(abs_top_srcdir)/android/lib/src/main/assets/share/theme_definitions/online" ; fi
@echo
@echo "Copied JS, HTML and CSS to the Android project (android/lib/src/main/assets/dist)."
@echo
More information about the Libreoffice-commits
mailing list