build.gradle 3.28 KB
Newer Older
1 2
buildscript {
    repositories {
3
        jcenter()
4
        mavenCentral()
binkybear's avatar
binkybear committed
5
        google()
6 7
    }
    dependencies {
8
        classpath 'com.android.tools.build:gradle:3.4.0'
9 10 11
    }
}

12

13 14
apply plugin: 'com.android.application'

binkybear's avatar
binkybear committed
15
repositories {
16 17 18 19
    jcenter()
    maven {
        url "https://maven.google.com"
    }
binkybear's avatar
binkybear committed
20
    google()
binkybear's avatar
binkybear committed
21 22
}

23
dependencies {
24 25 26
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.1.0-alpha10'
binkybear's avatar
binkybear committed
27 28
    implementation project(':androidwversionmanager')
    implementation 'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0'
29 30 31 32
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'joda-time:joda-time:2.10.4'
    implementation 'com.google.guava:guava:28.1-jre'
    implementation 'org.jetbrains:annotations:17.0.0'
33 34 35 36
}

android {

37
    compileSdkVersion 28
Re4son's avatar
Re4son committed
38
    buildToolsVersion '28.0.3'
39 40 41 42

    dataBinding {
        enabled = true
    }
43 44

    compileOptions {
45 46
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
47 48 49
    }

    defaultConfig {
50
        minSdkVersion 17
51
        targetSdkVersion 28
Re4son's avatar
Re4son committed
52
        versionCode 2019030500
Re4son's avatar
Re4son committed
53
        versionName "2019.3"
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

    }

    signingConfigs {

        debug {
71
            storeFile file("${System.properties['user.home']}" + "/.android/debug.keystore")
72 73 74 75 76 77 78 79 80 81 82
        }

        /* note:  To build a signed version of nethunter:
        1. Put your keystore in ~/.android/release-keystore and set up a key "nethunter"
        2. set KEYSTORE_PASSWORD and KEY_PASSWORD environment variables before running gradle.  this
           can be done easily by adding them to .bashrc
        (or change the below values, hard-coding or whatever...)
        3. Don't forget to create a proguard.cfg file.  You can find a sample one in the sdk or
           point to it directly.
        release {
            storePassword System.getenv("KEYSTORE_PASSWORD")
binkybear's avatar
binkybear committed
83
            storeFile file("${System.properties['user.home']}" +  "/.android/release.keystore")
84 85 86 87
            keyAlias "nethunter"
            keyPassword System.getenv("KEY_PASSWORD")

        }
88
       */ 
89 90 91 92 93
    }

    buildTypes {

        debug {
94
            minifyEnabled false
95 96
            buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
            buildConfigField "String", "BUILD_NAME", "\"" + System.getenv("USER") + "\""
97

98
            return true
99 100
        }
        release {
101
            //signingConfig signingConfigs.release
binkybear's avatar
binkybear committed
102
            minifyEnabled false
binkybear's avatar
binkybear committed
103
            shrinkResources false
104
            proguardFiles getDefaultProguardFile('proguard-android.txt')
105 106 107
            debuggable false
            jniDebuggable false
            zipAlignEnabled true
108 109
            buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
            buildConfigField "String", "BUILD_NAME", "\"" + System.getenv("USER") + "\""
110

111
            return true
112 113 114
        }
    }
}