~samwhited/oslp

ref: 66dea4bc7d774773415cec80b96fe1754807764f oslp/build.gradle -rw-r--r-- 2.5 KiB
66dea4bcSam Whited Tweak debug app ID suffix 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.1'
    }
}
allprojects {
    repositories {
        mavenCentral()
        jcenter()
        google()
    }
}

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.samwhited.opensharelocationplugin"
        minSdkVersion 17
        targetSdkVersion 27
        versionCode 17
        versionName "2.4.2"
        manifestPlaceholders = [apiKey: thunderforestAPIKey]
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    lintOptions {
        disable 'MissingTranslation'
    }
    //
    // To sign release builds, create the file `gradle.properties` in
    // $HOME/.gradle or in your project directory with this content:
    //
    // mStoreFile=/path/to/key.store
    // mStorePassword=xxx
    // mKeyAlias=alias
    // mKeyPassword=xxx
    //
    if (project.hasProperty('mStoreFile') &&
            project.hasProperty('mStorePassword') &&
            project.hasProperty('mKeyAlias') &&
            project.hasProperty('mKeyPassword')) {
        signingConfigs {
            release {
                storeFile file(project.properties.get('mStoreFile'))
                storePassword project.properties.get('mStorePassword')
                keyAlias project.properties.get('mKeyAlias')
                keyPassword project.properties.get('mKeyPassword')
            }
        }
        defaultConfig.signingConfig = signingConfigs.release
        buildTypes.release.signingConfig = signingConfigs.release
        buildTypes.debug.signingConfig = signingConfigs.release
    }
    buildTypes {
        debug {
            applicationIdSuffix '.debug'
        }
        release {
            minifyEnabled true
        }
    }
}

task copyAssets(type: Copy)
copyAssets {
    description = 'Copies asset files into the appropriate source directory'
    from '.'
    into 'src/main/assets/'
    include('LICENSE')
}

preBuild.dependsOn(copyAssets)

apply plugin: 'base'
clean.doFirst({
    delete('src/main/assets')
})

ext {
    supportLibVersion = '27.1.1'
}

dependencies {
    implementation "com.android.support:appcompat-v7:$supportLibVersion"
    implementation "com.android.support:support-v4:$supportLibVersion"
    implementation "com.android.support:design:$supportLibVersion"
    implementation 'org.osmdroid:osmdroid-android:6.0.1'
}