|
@@ -20,7 +20,12 @@ apply plugin: 'pmd'
|
|
apply plugin: 'findbugs'
|
|
apply plugin: 'findbugs'
|
|
|
|
|
|
ext {
|
|
ext {
|
|
- supportLibraryVersion = '23.4.0'
|
|
|
|
|
|
+ supportLibraryVersion = '24.2.1'
|
|
|
|
+
|
|
|
|
+ travisBuild = System.getenv("TRAVIS") == "true"
|
|
|
|
+
|
|
|
|
+ // allows for -Dpre-dex=false to be set
|
|
|
|
+ preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
|
|
}
|
|
}
|
|
|
|
|
|
repositories {
|
|
repositories {
|
|
@@ -36,13 +41,14 @@ dependencies {
|
|
/// dependencies for app building
|
|
/// dependencies for app building
|
|
compile name: 'touch-image-view'
|
|
compile name: 'touch-image-view'
|
|
|
|
|
|
- compile 'com.github.nextcloud:android-library:1.0.7'
|
|
|
|
|
|
+ compile 'com.github.nextcloud:android-library:1.0.8'
|
|
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
compile "com.android.support:design:${supportLibraryVersion}"
|
|
compile "com.android.support:design:${supportLibraryVersion}"
|
|
compile 'com.jakewharton:disklrucache:2.0.2'
|
|
compile 'com.jakewharton:disklrucache:2.0.2'
|
|
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
|
compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
|
compile 'com.getbase:floatingactionbutton:1.10.1'
|
|
compile 'com.getbase:floatingactionbutton:1.10.1'
|
|
|
|
|
|
|
|
+
|
|
/// dependencies for local unit tests
|
|
/// dependencies for local unit tests
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'junit:junit:4.12'
|
|
testCompile 'org.mockito:mockito-core:1.10.19'
|
|
testCompile 'org.mockito:mockito-core:1.10.19'
|
|
@@ -62,10 +68,10 @@ dependencies {
|
|
|
|
|
|
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
|
|
// UIAutomator - for cross-app UI tests, and to grant screen is turned on in Espresso tests
|
|
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
|
|
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
|
|
-
|
|
|
|
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
|
// fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
|
androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
tasks.withType(Test) {
|
|
tasks.withType(Test) {
|
|
@@ -82,8 +88,8 @@ android {
|
|
htmlReport true
|
|
htmlReport true
|
|
htmlOutput file("$project.buildDir/reports/lint/lint.html")
|
|
htmlOutput file("$project.buildDir/reports/lint/lint.html")
|
|
}
|
|
}
|
|
- compileSdkVersion 23
|
|
|
|
- buildToolsVersion "23.0.3"
|
|
|
|
|
|
+ compileSdkVersion 24
|
|
|
|
+ buildToolsVersion "24.0.2"
|
|
|
|
|
|
defaultConfig {
|
|
defaultConfig {
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
@@ -109,12 +115,14 @@ android {
|
|
assets.srcDirs = ['assets']
|
|
assets.srcDirs = ['assets']
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// move whole local unit tests structure as a whole from src/test/* to test/*
|
|
// move whole local unit tests structure as a whole from src/test/* to test/*
|
|
test.setRoot('test')
|
|
test.setRoot('test')
|
|
|
|
|
|
// move whole instrumented tests structure as a whole from src/androidTest/* to androidTest/*
|
|
// move whole instrumented tests structure as a whole from src/androidTest/* to androidTest/*
|
|
androidTest.setRoot('androidTest')
|
|
androidTest.setRoot('androidTest')
|
|
|
|
|
|
|
|
+
|
|
// Move the build types to build-types/<type>
|
|
// Move the build types to build-types/<type>
|
|
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
|
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
|
// This moves them out of them default location under src/<type>/... which would
|
|
// This moves them out of them default location under src/<type>/... which would
|
|
@@ -124,6 +132,11 @@ android {
|
|
debug.setRoot('build-types/debug')
|
|
debug.setRoot('build-types/debug')
|
|
release.setRoot('build-types/release')
|
|
release.setRoot('build-types/release')
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ dexOptions {
|
|
|
|
+ // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
|
|
|
|
+ preDexLibraries = preDexEnabled && !travisBuild
|
|
|
|
+ }
|
|
|
|
|
|
compileOptions {
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
sourceCompatibility JavaVersion.VERSION_1_7
|
|
@@ -137,7 +150,6 @@ android {
|
|
packagingOptions {
|
|
packagingOptions {
|
|
exclude 'META-INF/LICENSE.txt'
|
|
exclude 'META-INF/LICENSE.txt'
|
|
}
|
|
}
|
|
-
|
|
|
|
task checkstyle(type: Checkstyle) {
|
|
task checkstyle(type: Checkstyle) {
|
|
configFile = file("${rootProject.projectDir}/checkstyle.xml")
|
|
configFile = file("${rootProject.projectDir}/checkstyle.xml")
|
|
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
|
|
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
|