summaryrefslogtreecommitdiff
path: root/android/source/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'android/source/Makefile')
-rw-r--r--android/source/Makefile42
1 files changed, 18 insertions, 24 deletions
diff --git a/android/source/Makefile b/android/source/Makefile
index 5c51db8ed5db..6f2f96803f37 100644
--- a/android/source/Makefile
+++ b/android/source/Makefile
@@ -5,11 +5,7 @@ endif
# The default target just builds.
-all: build-ant
-
-# The package of this app
-# The setting from configure (ANDROID_PACKAGE_NAME) is applied in later stages.
-APP_PACKAGE=org.libreoffice
+all: build-gradle
DISABLE_UI=TRUE
BOOTSTRAPDIR=../Bootstrap
@@ -18,27 +14,25 @@ include $(BOOTSTRAPDIR)/Makefile.shared
native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py
$< -j -g core -g writer -g calc -g draw -g edit > $@
-build-ant: android_version_setup copy-stuff prepare-appcompat link-so properties
-#
-# Copy jar files we need
-#
- for F in java_uno \
- juh \
- jurt \
- ridl \
- unoloader; do \
- $(call COPYJAR,$(INSTDIR)/$(LIBO_URE_SHARE_JAVA_FOLDER)/$${F}.jar); \
- done
- for F in unoil; do \
- $(call COPYJAR,$(INSTDIR)/$(LIBO_SHARE_JAVA_FOLDER)/$${F}.jar); \
- done
- #ownCloud lib dependency
- $(call COPYJAR,$(WORKDIR)/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar)
-#
- unset JAVA_HOME && $(ANT) $(if $(verbose),,-quiet) $(if $(ENABLE_RELEASE_BUILD),release,debug)
+install:
+ ./gradlew $(if $(verbose),--info) $(if $(versionCode),-PcmdVersionCode=$(versionCode)) install$(if $(DISABLE_UI),StrippedUI,FullUI)Debug
+ @echo
+ @echo 'Run it with "make run"'
+ @echo
+
+uninstall:
+ $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(ANDROID_PACKAGE_NAME)
+
+clean:
+ rm -rf assets assets_fullUI assets_strippedUI jniLibs jniLibs_debug $(OBJLOCAL)
+ rm -f native-code.cxx
+ rm -f liboSettings.gradle
+
+build-gradle: liboSettings.gradle local.properties link-so
+ ./gradlew $(if $(verbose),--info) $(if $(versionCode),-PcmdVersionCode=$(versionCode)) assemble$(if $(DISABLE_UI),StrippedUI,FullUI)$(if $(ENABLE_RELEASE_BUILD),Release,Debug)
run:
- adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(ANDROID_PACKAGE_NAME)/.ui.LibreOfficeUIActivity
debugrun:
$(SYSBASE)/../../../ndk-gdb --start