build.gradle 2.05 KB
Newer Older
Andy Trevorah's avatar
Andy Trevorah committed
1 2
apply plugin: 'com.android.application'

Eric Eastwood's avatar
Eric Eastwood committed
3 4
// Try reading secrets from file
def secretsPropertiesFile = rootProject.file("secrets.properties")
5
def secretProperties = new Properties()
Eric Eastwood's avatar
Eric Eastwood committed
6 7 8 9 10 11 12 13 14 15
if (secretsPropertiesFile.exists()) {
    secretProperties.load(new FileInputStream(secretsPropertiesFile))
}
// Otherwise read from environment variables, this happens in CI
else {
    secretProperties.setProperty("oauth_client_id", System.getenv('oauth_client_id'))
    secretProperties.setProperty("oauth_client_secret", System.getenv('oauth_client_secret'))
    secretProperties.setProperty("oauth_redirect_uri", System.getenv('oauth_redirect_uri'))
    secretProperties.setProperty("google_project_id", System.getenv('google_project_id') ?: "null")
}
16

Andy Trevorah's avatar
Andy Trevorah committed
17
android {
Andy Trevorah's avatar
Andy Trevorah committed
18
    compileSdkVersion 24
19
    buildToolsVersion '27.0.3'
Andy Trevorah's avatar
Andy Trevorah committed
20 21 22

    defaultConfig {
        applicationId "im.gitter.gitter"
Andy Trevorah's avatar
Andy Trevorah committed
23
        minSdkVersion 19
Andy Trevorah's avatar
Andy Trevorah committed
24
        targetSdkVersion 24
Eric Eastwood's avatar
Eric Eastwood committed
25 26
        versionCode 81
        versionName "3.2.0"
27

Eric Eastwood's avatar
Eric Eastwood committed
28 29 30 31
        buildConfigField("String", "oauth_client_id", "\"${secretProperties['oauth_client_id']}\"")
        buildConfigField("String", "oauth_client_secret", "\"${secretProperties['oauth_client_secret']}\"")
        buildConfigField("String", "oauth_redirect_uri", "\"${secretProperties['oauth_redirect_uri']}\"")
        buildConfigField("String", "google_project_id", "\"${secretProperties['google_project_id']}\"" ?: "null")
Andy Trevorah's avatar
Andy Trevorah committed
32 33 34
    }
    buildTypes {
        release {
35
            minifyEnabled false
Andy Trevorah's avatar
Andy Trevorah committed
36 37 38 39 40
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

Andy Trevorah's avatar
Andy Trevorah committed
41 42 43 44
repositories {
    mavenCentral()
}

Andy Trevorah's avatar
Andy Trevorah committed
45
dependencies {
46 47 48 49 50 51 52 53
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:design:24.2.1'
    implementation 'com.android.volley:volley:1.0.0'
    implementation "com.google.android.gms:play-services-gcm:9.6.1"
    implementation 'joda-time:joda-time:2.5'
    implementation 'com.github.rahatarmanahmed:circularprogressview:2.4.0'
    implementation 'com.getbase:floatingactionbutton:1.10.1'
    testImplementation 'junit:junit:4.12'
Andy Trevorah's avatar
Andy Trevorah committed
54
}