|
@@ -14,6 +14,7 @@ buildscript {
|
|
|
}
|
|
|
dependencies {
|
|
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
|
|
+ classpath 'com.google.gms:google-services:3.0.0'
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -40,54 +41,6 @@ repositories {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-dependencies {
|
|
|
- /// dependencies for app building
|
|
|
- compile name: 'touch-image-view'
|
|
|
- compile 'com.android.support:multidex:1.0.1'
|
|
|
-
|
|
|
- compile 'com.github.nextcloud:android-library:1.0.13'
|
|
|
- compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
|
- compile "com.android.support:design:${supportLibraryVersion}"
|
|
|
- compile 'com.jakewharton:disklrucache:2.0.2'
|
|
|
- compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
|
|
- compile 'com.getbase:floatingactionbutton:1.10.1'
|
|
|
- compile 'com.google.code.findbugs:annotations:2.0.1'
|
|
|
- compile group: 'commons-io', name: 'commons-io', version: '2.4'
|
|
|
- compile 'com.google.android.gms:play-services:10.2.0'
|
|
|
- compile 'com.github.evernote:android-job:v1.1.7'
|
|
|
-
|
|
|
- /// dependencies for local unit tests
|
|
|
- testCompile 'junit:junit:4.12'
|
|
|
- testCompile 'org.mockito:mockito-core:1.10.19'
|
|
|
-
|
|
|
- /// 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'
|
|
|
-
|
|
|
- // Android Annotation Support
|
|
|
- androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
-
|
|
|
- // Espresso core
|
|
|
- androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
|
|
|
-
|
|
|
- // 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'
|
|
|
- // fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
|
|
- androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
-
|
|
|
-tasks.withType(Test) {
|
|
|
- /// increased logging for tests
|
|
|
- testLogging {
|
|
|
- events "passed", "skipped", "failed"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
android {
|
|
|
lintOptions {
|
|
|
abortOnError true
|
|
@@ -112,40 +65,33 @@ android {
|
|
|
testInstrumentationRunnerArgument "TEST_SERVER_URL", "\"$System.env.OCTEST_SERVER_BASE_URL\""
|
|
|
|
|
|
multiDexEnabled true
|
|
|
- applicationId "com.nextcloud.client"
|
|
|
- }
|
|
|
|
|
|
- // 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
|
|
|
- sourceSets {
|
|
|
- main {
|
|
|
- manifest.srcFile 'AndroidManifest.xml'
|
|
|
- java.srcDirs = ['src']
|
|
|
- resources.srcDirs = ['src']
|
|
|
- aidl.srcDirs = ['src']
|
|
|
- renderscript.srcDirs = ['src']
|
|
|
- res.srcDirs = ['res']
|
|
|
- assets.srcDirs = ['assets']
|
|
|
- }
|
|
|
+ // 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
|
|
|
|
|
|
+ productFlavors {
|
|
|
+ generic {
|
|
|
+ applicationId 'com.nextcloud.client'
|
|
|
+ }
|
|
|
+
|
|
|
+ custom {
|
|
|
+ // structure is:
|
|
|
+ // domain tld
|
|
|
+ // domain name
|
|
|
+ // .client
|
|
|
+ applicationId 'com.custom.client'
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // move whole local unit tests structure as a whole from src/test/* to test/*
|
|
|
- test.setRoot('test')
|
|
|
+ configurations {
|
|
|
+ customCompile
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // move whole instrumented tests structure as a whole from src/androidTest/* to androidTest/*
|
|
|
- androidTest.setRoot('androidTest')
|
|
|
|
|
|
+ // 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
|
|
|
|
|
|
- // 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')
|
|
|
- }
|
|
|
-
|
|
|
dexOptions {
|
|
|
// Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
|
|
|
preDexLibraries = preDexEnabled && !travisBuild
|
|
@@ -163,6 +109,7 @@ android {
|
|
|
packagingOptions {
|
|
|
exclude 'META-INF/LICENSE.txt'
|
|
|
}
|
|
|
+
|
|
|
task checkstyle(type: Checkstyle) {
|
|
|
configFile = file("${rootProject.projectDir}/checkstyle.xml")
|
|
|
configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath
|
|
@@ -215,3 +162,54 @@ android {
|
|
|
check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+dependencies {
|
|
|
+ /// dependencies for app building
|
|
|
+ compile name: 'touch-image-view'
|
|
|
+ compile 'com.android.support:multidex:1.0.1'
|
|
|
+
|
|
|
+ compile 'com.github.nextcloud:android-library:1.0.11'
|
|
|
+ compile "com.android.support:support-v4:${supportLibraryVersion}"
|
|
|
+ compile "com.android.support:design:${supportLibraryVersion}"
|
|
|
+ compile 'com.jakewharton:disklrucache:2.0.2'
|
|
|
+ compile "com.android.support:appcompat-v7:${supportLibraryVersion}"
|
|
|
+ compile 'com.getbase:floatingactionbutton:1.10.1'
|
|
|
+ compile 'com.google.code.findbugs:annotations:2.0.1'
|
|
|
+ compile group: 'commons-io', name: 'commons-io', version: '2.4'
|
|
|
+ compile 'com.google.android.gms:play-services:10.2.0'
|
|
|
+ compile 'com.github.evernote:android-job:v1.1.7'
|
|
|
+
|
|
|
+ customCompile 'com.google.firebase:firebase-core:10.2.0'
|
|
|
+
|
|
|
+ /// dependencies for local unit tests
|
|
|
+ testCompile 'junit:junit:4.12'
|
|
|
+ testCompile 'org.mockito:mockito-core:1.10.19'
|
|
|
+
|
|
|
+ /// 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'
|
|
|
+
|
|
|
+ // Android Annotation Support
|
|
|
+ androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
+
|
|
|
+ // Espresso core
|
|
|
+ androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
|
|
|
+
|
|
|
+ // 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'
|
|
|
+ // fix conflict in dependencies; see http://g.co/androidstudio/app-test-app-conflict for details
|
|
|
+ //androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+tasks.withType(Test) {
|
|
|
+ /// increased logging for tests
|
|
|
+ testLogging {
|
|
|
+ events "passed", "skipped", "failed"
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+apply plugin: 'com.google.gms.google-services'
|