build.gradle 2.52 KB
Newer Older
1 2
buildscript {
    repositories {
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
3
        jcenter()
4 5
    }
    dependencies {
6
        classpath 'com.android.tools.build:gradle:2.3.2'
7 8
    }
}
9

10
apply plugin: 'com.android.application'
11 12

android {
13 14
    buildToolsVersion '25.0.2'
    compileSdkVersion 25
15 16
    defaultConfig {
        minSdkVersion 9
17
        targetSdkVersion 25
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
18
        //multiDexEnabled true
19
        //testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
20
    }
Vineet Garg's avatar
Vineet Garg committed
21
    dexOptions {
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
22
        javaMaxHeapSize "2g"
Vineet Garg's avatar
Vineet Garg committed
23
    }
24 25 26 27 28
    compileOptions {
        // Use Java 1.7, requires minSdk 8
        //SSHD requires mina when running on JDK < 7
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
29 30 31 32 33 34 35 36 37
    }
	sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['resources']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
38 39 40
        androidTest {
            java.srcDirs = ['tests']
        }
41
    }
42
    packagingOptions {
43 44 45
        pickFirst "META-INF/DEPENDENCIES"
        pickFirst "META-INF/LICENSE"
        pickFirst "META-INF/NOTICE"
46 47 48
        pickFirst "META-INF/BCKEY.SF"
        pickFirst "META-INF/BCKEY.DSA"
        pickFirst "META-INF/INDEX.LIST"
49
        pickFirst "META-INF/io.netty.versions.properties"
50
    }
51 52
    lintOptions {
        abortOnError false
53
        checkReleaseBuilds false
54
    }
55
    buildTypes {
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
56 57 58 59
        debug {
            minifyEnabled false
            useProguard false
        }
60
        release { //keep on 'release', set to 'all' when testing to make sure proguard is not deleting important stuff
61
            minifyEnabled true
62
            useProguard true
63 64
            proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
        }
65
    }
66
}
67 68

dependencies {
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
69

70 71 72
    repositories {
        mavenCentral()
    }
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
73

74 75 76
    compile 'com.android.support:support-v4:25.1.1'
    compile 'com.android.support:appcompat-v7:25.1.1'
    compile 'com.android.support:design:25.1.1'
77

78
    compile 'org.apache.sshd:sshd-core:0.8.0' //0.9 seems to fail on Android 6 and 1.+ requires java.nio.file, which doesn't exist in Android
79

80
    compile 'com.madgag.spongycastle:pkix:1.54.0.0' //For SSL certificate generation
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
81 82

    // Testing
83
    androidTestCompile 'org.mockito:mockito-core:1.10.19'
84
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.1'// Because mockito has some problems with dex environment
Albert Vaca Cintora's avatar
Albert Vaca Cintora committed
85
    androidTestCompile 'org.skyscreamer:jsonassert:1.3.0'
86
    testCompile 'junit:junit:4.12'
87

88
}