123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- buildscript {
- repositories {
- jcenter()
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:2.2.1'
- }
- }
- apply plugin: 'com.android.application'
- apply plugin: 'checkstyle'
- apply plugin: 'pmd'
- apply plugin: 'findbugs'
- ext {
- supportLibraryVersion = '24.2.1'
- travisBuild = System.getenv("TRAVIS") == "true"
-
- preDexEnabled = "true".equals(System.getProperty("pre-dex", "true"))
- }
- repositories {
- jcenter()
- maven { url "https://jitpack.io" }
- flatDir {
- dirs 'libs'
- }
- }
- dependencies {
-
- compile name: 'touch-image-view'
- compile 'com.github.nextcloud:android-library:1.0.9'
- 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'
-
- testCompile 'junit:junit:4.12'
- testCompile 'org.mockito:mockito-core:1.10.19'
-
-
- androidTestCompile 'com.android.support.test:rules:0.5'
-
- androidTestCompile 'com.android.support.test:runner:0.5'
-
- androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
-
- androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
-
- androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
-
- androidTestCompile "com.android.support:support-annotations:${supportLibraryVersion}"
- }
- tasks.withType(Test) {
-
- testLogging {
- events "passed", "skipped", "failed"
- }
- }
- android {
- lintOptions {
- abortOnError true
- lintConfig file("${project.rootDir}/lint.xml")
- htmlReport true
- htmlOutput file("$project.buildDir/reports/lint/lint.html")
- }
- compileSdkVersion 24
- buildToolsVersion "24.0.2"
- defaultConfig {
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
- 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\""
- applicationId "com.nextcloud.client"
- }
-
-
- sourceSets {
- main {
- manifest.srcFile 'AndroidManifest.xml'
- java.srcDirs = ['src']
- resources.srcDirs = ['src']
- aidl.srcDirs = ['src']
- renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
- assets.srcDirs = ['assets']
- }
-
- test.setRoot('test')
-
- androidTest.setRoot('androidTest')
-
-
-
-
-
-
- debug.setRoot('build-types/debug')
- release.setRoot('build-types/release')
- }
-
- dexOptions {
-
- preDexLibraries = preDexEnabled && !travisBuild
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_7
- targetCompatibility JavaVersion.VERSION_1_7
- }
- lintOptions {
- abortOnError false
- }
- 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
- source 'src'
- include '**/*.java'
- exclude '**/gen/**'
- classpath = files()
- }
- task pmd(type: Pmd) {
- ruleSetFiles = files("${project.rootDir}/pmd-ruleset.xml")
- ignoreFailures = false
- ruleSets = []
- source 'src'
- include '**/*.java'
- exclude '**/gen/**'
- reports {
- xml.enabled = false
- html.enabled = true
- xml {
- destination "$project.buildDir/reports/pmd/pmd.xml"
- }
- html {
- destination "$project.buildDir/reports/pmd/pmd.html"
- }
- }
- }
- task findbugs(type: FindBugs) {
- ignoreFailures = false
- effort = "max"
- reportLevel = "high"
- classes = files("$project.buildDir/intermediates/classes")
- excludeFilter = new File("${project.rootDir}/findbugs-filter.xml")
- source 'src'
- include '**/*.java'
- exclude '**/gen/**'
- reports {
- xml.enabled = false
- html.enabled = true
- html {
- destination "$project.buildDir/reports/findbugs/findbugs.html"
- }
- }
- classpath = files()
- }
- check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'
- }
|