diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-11 01:53:29 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-10-11 02:03:13 +0200 |
commit | ee8257a1c70eadb7330b0ee99ec3b86fe4084bdf (patch) | |
tree | c30c86bfa14fc46d94b2da4a3087be9e972c5772 /android/source/Makefile | |
parent | Updated core (diff) | |
download | core-ee8257a1c70eadb7330b0ee99ec3b86fe4084bdf.tar.gz core-ee8257a1c70eadb7330b0ee99ec3b86fe4084bdf.zip |
migrate android build to gradle
move preparation tasks (creating assets/processing files) from the
makefile into the gradle script
This allows much easier integration into android-studio (just open
android/source with android studio after running make to compile the
native library)
Change-Id: I9a9d6832797c24a7e195a1c7954cd6d20f5a8496
Diffstat (limited to 'android/source/Makefile')
-rw-r--r-- | android/source/Makefile | 42 |
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 |