android/app/build.gradle |    6 ------
 android/lib/build.gradle |   12 ++++++++++--
 loleaflet/Makefile.am    |   12 ++++--------
 3 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit 132bef2a972647b310fbf88a5e97b0789ad1ce14
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Wed May 27 12:43:29 2020 -0400
Commit:     Henry Castro <hcas...@collabora.com>
CommitDate: Thu Jun 11 21:00:45 2020 +0200

    android: generate debug and release loleaflet assets
    
    Change-Id: If3659de771b3d1f7015c1e4c26d6877f90afe306
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94996
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Henry Castro <hcas...@collabora.com>

diff --git a/android/app/build.gradle b/android/app/build.gradle
index 1b4848bd0..3d364a40e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -83,16 +83,10 @@ task copyBrandFiles(type: Copy) {
        into "src/main/res"
 }
 
-task generateLoleafletAssets(type: Exec) {
-       commandLine 'make', '-C', '../../'
-}
-
 afterEvaluate {
        if (!project.ext.liboHasBranding.equals("true") || 
!file("${liboBrandingDir}").exists()) {
                copyBrandFiles.enabled = false
        }
 
        preBuild.dependsOn copyBrandFiles
-       generateDebugAssets.dependsOn generateLoleafletAssets
-       generateReleaseAssets.dependsOn generateLoleafletAssets
 }
diff --git a/android/lib/build.gradle b/android/lib/build.gradle
index 50cb2fc43..1b1eb90df 100644
--- a/android/lib/build.gradle
+++ b/android/lib/build.gradle
@@ -298,10 +298,18 @@ preBuild.dependsOn 'createRCfiles',
         'createFullConfig',
         'copyBrandTheme'
 
+task generateLoleafletDebugAssets(type: Exec) {
+       commandLine 'make', '-C', '../../', 
"DIST_FOLDER=${project.getProjectDir()}/src/debug/assets/dist", 'BUNDLE=DEBUG'
+}
+
+task generateLoleafletReleaseAssets(type: Exec) {
+       commandLine 'make', '-C', '../../', 
"DIST_FOLDER=${project.getProjectDir()}/src/release/assets/dist", 
'BUNDLE=RELEASE'
+}
+
 afterEvaluate {
        if (!file("${liboBrandingDir}").exists()) {
                copyBrandTheme.enabled = false
        }
-       generateDebugAssets.dependsOn copyDocTemplates, copyKitConfig
-       generateReleaseAssets.dependsOn copyDocTemplates, copyKitConfig
+       generateDebugAssets.dependsOn copyDocTemplates, copyKitConfig, 
generateLoleafletDebugAssets
+       generateReleaseAssets.dependsOn copyDocTemplates, copyKitConfig, 
generateLoleafletReleaseAssets
 }
diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am
index b79a89f00..94269517b 100644
--- a/loleaflet/Makefile.am
+++ b/loleaflet/Makefile.am
@@ -5,11 +5,7 @@ L10N_PO = $(wildcard $(srcdir)/po/*.po)
 BUNDLE ?= $(if $(filter true,$(ENABLE_DEBUG)),DEBUG,RELEASE)
 IS_DEBUG = $(if $(filter DEBUG,$(BUNDLE)),true,)
 
-if ENABLE_ANDROIDAPP
-DIST_FOLDER = $(abs_top_srcdir)/android/lib/src/main/assets/dist
-else
-DIST_FOLDER = $(builddir)/dist
-endif
+DIST_FOLDER ?= $(builddir)/dist
 
 export NODE_PATH=$(abs_builddir)/node_module
 
@@ -412,9 +408,9 @@ build-loleaflet: compilets \
        $(DIST_FOLDER)/loleaflet.html
        @echo "build loleaflet completed"
 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)" ; then cp -a 
"$(APP_BRANDING_DIR)/branding.css" "$(APP_BRANDING_DIR)/branding.js" 
$(DIST_FOLDER)/ ; else touch $(DIST_FOLDER)/branding.css ; fi
+       @if test -d "$(APP_BRANDING_DIR)" ; then cp -a 
"$(APP_BRANDING_DIR)"/images/*.svg $(DIST_FOLDER)/images/ ; fi
+       @if test -d "$(APP_BRANDING_DIR)" ; then cp -a 
"$(APP_BRANDING_DIR)/images/toolbar-bg-logo.svg" 
$(DIST_FOLDER)/images/toolbar-bg.svg ; fi
        @echo
        @echo "JS, HTML and CSS has been updated 
(android/lib/src/main/assets/dist)."
 endif
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to