use gradle to build the owncloud-android-lib
this will allow using current android SDK tools & emulator Change-Id: Ic7f9996a36e4af2a5cad07e28c8830b8df12aa44
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
|
apply plugin: 'com.android.application'
|
||||||
|
// buildhost settings - paths and the like
|
||||||
|
apply from: 'liboSettings.gradle'
|
||||||
|
|
||||||
project.ext.set("archivesBaseName", "LibreOfficeViewer")
|
project.ext.set("archivesBaseName", "LibreOfficeViewer")
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url "https://maven.google.com"
|
url "https://maven.google.com"
|
||||||
}
|
}
|
||||||
|
flatDir {
|
||||||
|
dirs "${liboWorkdir}/UnpackedTarball/owncloud_android_lib/build/outputs/aar"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//build-time dependencies - android plugin for gradle
|
//build-time dependencies - android plugin for gradle
|
||||||
@@ -16,10 +23,6 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
|
||||||
// buildhost settings - paths and the like
|
|
||||||
apply from: 'liboSettings.gradle'
|
|
||||||
|
|
||||||
// compile-time dependencies
|
// compile-time dependencies
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: "${liboInstdir}/${liboUREJavaFolder}", include: [
|
compile fileTree(dir: "${liboInstdir}/${liboUREJavaFolder}", include: [
|
||||||
@@ -30,7 +33,8 @@ dependencies {
|
|||||||
"unoloader.jar"
|
"unoloader.jar"
|
||||||
])
|
])
|
||||||
compile files("${liboInstdir}/${liboShareJavaFolder}/unoil.jar")
|
compile files("${liboInstdir}/${liboShareJavaFolder}/unoil.jar")
|
||||||
compile files("${liboWorkdir}/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar")
|
debugCompile(name:'owncloud_android_lib-debug', ext:'aar')
|
||||||
|
releaseCompile(name:'owncloud_android_lib-release', ext:'aar')
|
||||||
compile 'com.android.support:design:26.1.0' // also pulls-in corresponding support libraries
|
compile 'com.android.support:design:26.1.0' // also pulls-in corresponding support libraries
|
||||||
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
compile 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||||
}
|
}
|
||||||
|
@@ -15,11 +15,7 @@ $(eval $(call gb_ExternalProject_register_targets,owncloud_android_lib,\
|
|||||||
|
|
||||||
$(call gb_ExternalProject_get_state_target,owncloud_android_lib,build) :
|
$(call gb_ExternalProject_get_state_target,owncloud_android_lib,build) :
|
||||||
$(call gb_ExternalProject_run,build,\
|
$(call gb_ExternalProject_run,build,\
|
||||||
$(ICECREAM_RUN) "$(ANT)" \
|
ANDROID_HOME=$(ANDROID_SDK_HOME) $(SRCDIR)/android/source/gradlew assemble \
|
||||||
$(if $(verbose),-v,-q) \
|
|
||||||
-f build.xml \
|
|
||||||
-Dsdk.dir=$(ANDROID_SDK_HOME) -Dtarget=android-22 \
|
|
||||||
release \
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
@@ -11,4 +11,6 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,owncloud_android_lib))
|
|||||||
|
|
||||||
$(eval $(call gb_UnpackedTarball_set_tarball,owncloud_android_lib,$(OWNCLOUD_ANDROID_LIB_TARBALL)))
|
$(eval $(call gb_UnpackedTarball_set_tarball,owncloud_android_lib,$(OWNCLOUD_ANDROID_LIB_TARBALL)))
|
||||||
|
|
||||||
|
$(eval $(call gb_UnpackedTarball_add_file,owncloud_android_lib,build.gradle,external/owncloud-android-lib/build.gradle))
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
49
external/owncloud-android-lib/build.gradle
vendored
Normal file
49
external/owncloud-android-lib/build.gradle
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
apply plugin: 'com.android.library'
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
useLibrary 'org.apache.http.legacy'
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
encoding 'ISO8859-1'
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_7
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_7
|
||||||
|
}
|
||||||
|
|
||||||
|
compileSdkVersion 26
|
||||||
|
buildToolsVersion "26.0.1"
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
minSdkVersion 14
|
||||||
|
targetSdkVersion 24
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
manifest.srcFile 'AndroidManifest.xml'
|
||||||
|
java {
|
||||||
|
srcDirs = [
|
||||||
|
'libs/commons-codec-1.9/src/main/java',
|
||||||
|
'libs/commons-httpclient-3.1/src/java',
|
||||||
|
'libs/jackrabbit-webdav-2.7.2/src/main/java',
|
||||||
|
'libs/slf4j-1.7.12/src/java',
|
||||||
|
'libs/tomcat-7.0.40/java',
|
||||||
|
'src'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
resources {
|
||||||
|
srcDirs = [
|
||||||
|
'libs/tomcat-7.0.40/java',
|
||||||
|
'libs/jackrabbit-webdav-2.7.2/src/main/java'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user