2016-05-04 15:33:43 +03:00
|
|
|
// Gradle build file
|
|
|
|
//
|
|
|
|
// This project was started in Eclipse and later moved to Android Studio. In the transition, both IDEs were supported.
|
|
|
|
// Due to this, the files layout is not the usual in new projects created with Android Studio / gradle. This file
|
|
|
|
// merges declarations usually split in two separates build.gradle file, one for global settings of the project in
|
|
|
|
// its root folder, another one for the app module in subfolder of root.
|
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
2016-04-27 15:48:05 +03:00
|
|
|
classpath 'com.android.tools.build:gradle:2.1.0'
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
2016-04-27 15:48:05 +03:00
|
|
|
ext {
|
|
|
|
supportLibraryVersion = '23.1.1'
|
|
|
|
}
|
2014-10-03 14:33:41 +04:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
|
|
|
|
flatDir {
|
|
|
|
dirs 'libs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2016-05-04 17:03:59 +03:00
|
|
|
/// dependencies for app building
|
2014-10-03 14:33:41 +04:00
|
|
|
compile name: 'touch-image-view'
|
|
|
|
compile project(':owncloud-android-library')
|
2016-04-28 12:05:52 +03:00
|
|
|
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
|
|
compile "com.android.support:design:${supportLibraryVersion}"
|
2014-10-03 14:33:41 +04:00
|
|
|
compile 'com.jakewharton:disklrucache:2.0.2'
|
2016-04-28 12:05:52 +03:00
|
|
|
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
2016-02-25 21:04:28 +03:00
|
|
|
compile 'com.getbase:floatingactionbutton:1.10.1'
|
2016-05-04 17:03:59 +03:00
|
|
|
|
2016-05-05 09:46:47 +03:00
|
|
|
|
2016-05-04 17:03:59 +03:00
|
|
|
/// dependencies for local unit tests
|
|
|
|
testCompile 'junit:junit:4.12'
|
|
|
|
testCompile 'org.mockito:mockito-core:1.10.19'
|
2016-05-05 09:46:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
/// dependencies for instrumented tests
|
|
|
|
// JUnit4 Rules
|
|
|
|
androidTestCompile 'com.android.support.test:rules:0.5'
|
|
|
|
|
|
|
|
// Android JUnit Runner
|
|
|
|
androidTestCompile 'com.android.support.test:runner:0.5'
|
|
|
|
|
|
|
|
// Espresso core
|
|
|
|
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
|
|
|
|
|
2016-05-05 09:46:47 +03:00
|
|
|
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
|
2016-05-09 17:09:06 +03:00
|
|
|
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
|
2016-05-05 09:46:47 +03:00
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
|
2016-05-06 16:38:12 +03:00
|
|
|
tasks.withType(Test) {
|
|
|
|
/// increased logging for tests
|
|
|
|
testLogging {
|
|
|
|
events "passed", "skipped", "failed"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
android {
|
2015-11-28 13:26:58 +03:00
|
|
|
compileSdkVersion 23
|
2016-04-07 23:41:31 +03:00
|
|
|
buildToolsVersion "23.0.3"
|
2015-11-28 13:26:58 +03:00
|
|
|
|
2016-05-05 09:46:47 +03:00
|
|
|
defaultConfig {
|
|
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
2016-05-06 09:46:50 +03:00
|
|
|
|
2016-05-09 15:06:44 +03:00
|
|
|
// arguments to be passed to functional tests
|
2016-05-09 15:37:08 +03:00
|
|
|
testInstrumentationRunnerArgument "TEST_USER", "\"$System.env.OCTEST_APP_USERNAME\""
|
|
|
|
testInstrumentationRunnerArgument "TEST_PASSWORD", "\"$System.env.OCTEST_APP_PASSWORD\""
|
|
|
|
testInstrumentationRunnerArgument "TEST_SERVER_URL", "\"$System.env.OCTEST_SERVER_BASE_URL\""
|
2016-05-05 09:46:47 +03:00
|
|
|
}
|
|
|
|
|
2016-05-04 15:33:43 +03:00
|
|
|
// adapt structure from Eclipse to Gradle/Android Studio expectations;
|
|
|
|
// see http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Configuring-the-Structure
|
2014-10-03 14:33:41 +04:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
|
|
java.srcDirs = ['src']
|
|
|
|
resources.srcDirs = ['src']
|
|
|
|
aidl.srcDirs = ['src']
|
|
|
|
renderscript.srcDirs = ['src']
|
|
|
|
res.srcDirs = ['res']
|
2016-05-04 15:33:43 +03:00
|
|
|
assets.srcDirs = ['assets']
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
|
|
|
|
2016-05-09 16:02:21 +03:00
|
|
|
|
2016-05-05 10:15:59 +03:00
|
|
|
// move whole local unit tests structure as a whole from src/test/* to test/*
|
2016-05-04 15:33:43 +03:00
|
|
|
test.setRoot('test')
|
2014-10-03 14:33:41 +04:00
|
|
|
|
2016-05-05 10:15:59 +03:00
|
|
|
// move whole instrumented tests structure as a whole from src/androidTest/* to androidTest/*
|
|
|
|
androidTest.setRoot('androidTest')
|
|
|
|
|
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
// Move the build types to build-types/<type>
|
|
|
|
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
|
|
|
// This moves them out of them default location under src/<type>/... which would
|
|
|
|
// conflict with src/ being used by the main source set.
|
|
|
|
// Adding new build types or product flavors should be accompanied
|
|
|
|
// by a similar customization.
|
|
|
|
debug.setRoot('build-types/debug')
|
|
|
|
release.setRoot('build-types/release')
|
|
|
|
}
|
|
|
|
|
2015-12-02 23:18:58 +03:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_7
|
|
|
|
}
|
|
|
|
|
|
|
|
lintOptions {
|
|
|
|
abortOnError false
|
2014-10-03 14:33:41 +04:00
|
|
|
}
|
2015-10-14 13:58:07 +03:00
|
|
|
|
2014-10-03 14:33:41 +04:00
|
|
|
packagingOptions {
|
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
|
}
|
2015-10-14 13:58:07 +03:00
|
|
|
|
2016-05-05 09:46:47 +03:00
|
|
|
}
|