hash-checker

Форк
0
/
build.gradle 
180 строк · 6.2 Кб
1
apply plugin: 'com.android.application'
2
apply plugin: 'com.jaredsburrows.license'
3

4
android {
5
    compileSdkVersion 33
6
    buildToolsVersion '33.0.0'
7
    defaultConfig {
8
        applicationId 'com.smlnskgmail.jaman.hashchecker'
9
        minSdkVersion 21
10
        targetSdkVersion 33
11
        versionCode 99
12
        versionName '3.7.3'
13
        vectorDrawables.useSupportLibrary = true
14

15
        testInstrumentationRunner 'com.smlnskgmail.jaman.hashchecker.runner.AndroidJacocoTestRunner'
16

17
        resConfigs 'en', 'de', 'el', 'es', 'fa', 'fr', 'hu', 'it', 'iw', 'ko', 'my', 'nl', 'pl', 'ro', 'ru', 'sv',
18
                'pt-rBR', 'zh-rCN', 'vi', 'ja', 'hi'
19
    }
20
    signingConfigs {
21
        release {
22
            if (!System.getenv('CI')) {
23
//                final KEYSTORE_PATH = 'RELEASE_KEYSTORE_PATH'
24
//                final KEYSTORE_PASSWORD = 'RELEASE_KEYSTORE_PASSWORD'
25
//                final KEY_ALIAS = 'RELEASE_KEY_ALIAS'
26
//                final KEY_PASSWORD = 'RELEASE_KEY_PASSWORD'
27
//                def keystoreProperties = new Properties()
28
//                def keystorePropertiesFile = rootProject.file("local.properties")
29
//                if (keystorePropertiesFile.exists()) {
30
//                    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
31
//                }
32
//                def hasSignConfigInProperties = propertiesHasSignConfig(
33
//                        keystoreProperties,
34
//                        KEYSTORE_PATH,
35
//                        KEYSTORE_PASSWORD,
36
//                        KEY_ALIAS,
37
//                        KEY_PASSWORD
38
//                )
39
//                if (!hasSignConfigInProperties) {
40
//                    hasSignConfigInProperties = envHasSignConfig(
41
//                            KEYSTORE_PATH,
42
//                            KEYSTORE_PASSWORD,
43
//                            KEY_ALIAS,
44
//                            KEY_PASSWORD
45
//                    )
46
//                    if (hasSignConfigInProperties) {
47
//                        keystoreProperties.put(KEYSTORE_PATH, System.getenv(KEYSTORE_PATH))
48
//                        keystoreProperties.put(KEYSTORE_PASSWORD, System.getenv(KEYSTORE_PASSWORD))
49
//                        keystoreProperties.put(KEY_ALIAS, System.getenv(KEY_ALIAS))
50
//                        keystoreProperties.put(KEY_PASSWORD, System.getenv(KEY_PASSWORD))
51
//                    }
52
//                }
53
//                try {
54
//                    storeFile file(keystoreProperties[KEYSTORE_PATH])
55
//                    storePassword keystoreProperties[KEYSTORE_PASSWORD]
56
//                    keyAlias keystoreProperties[KEY_ALIAS]
57
//                    keyPassword keystoreProperties[KEY_PASSWORD]
58
//                } catch (ignore) {
59
//                    throw new InvalidUserDataException("You should define sign keys in gradle.properties or int ENV.")
60
//                }
61
            }
62
        }
63
    }
64
    buildTypes {
65
        debug {
66
            versionNameSuffix '-dev'
67
            minifyEnabled false
68

69
            testCoverageEnabled = true
70
        }
71
        release {
72
            minifyEnabled true
73
            shrinkResources true
74
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
75

76
            signingConfig signingConfigs.release
77
        }
78
    }
79

80
    flavorDimensions "distribute-version"
81
    productFlavors {
82
        thirdPartyStores {
83
            dimension "distribute-version"
84
            applicationIdSuffix ".thirdparty"
85
            versionNameSuffix "-thirdparty"
86
        }
87
        googlePlay {
88
            dimension "distribute-version"
89
        }
90
    }
91

92
    compileOptions {
93
        sourceCompatibility JavaVersion.VERSION_1_8
94
        targetCompatibility JavaVersion.VERSION_1_8
95
    }
96
    sourceSets {
97
        main {
98
            resources.srcDirs = [
99
                    'src/main/resources',
100
                    'src/test'
101
            ]
102
        }
103
    }
104
    testOptions {
105
        animationsDisabled true
106

107
        unitTests {
108
            includeAndroidResources = true
109
        }
110
    }
111
    applicationVariants.all { variant ->
112
        variant.outputs.each { output ->
113
            def buildType = variant.buildType.name
114
            output.outputFileName = "hash-checker_${buildType}.apk"
115
        }
116
    }
117
}
118

119
//static boolean propertiesHasSignConfig(
120
//        properties,
121
//        path,
122
//        password,
123
//        keyAlias,
124
//        keyPassword
125
//) {
126
//    def has = { key -> properties.containsKey(key) }
127
//    return has(path) && has(password) && has(keyAlias) && has(keyPassword)
128
//}
129

130
//static boolean envHasSignConfig(
131
//        path,
132
//        password,
133
//        keyAlias,
134
//        keyPassword
135
//) {
136
//    def has = { key -> System.getenv().containsKey(key) }
137
//    return has(path) && has(password) && has(keyAlias) && has(keyPassword)
138
//}
139

140
dependencies {
141
    implementation 'androidx.appcompat:appcompat:1.6.1'
142
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
143
    implementation 'com.google.android.material:material:1.9.0'
144
    implementation 'androidx.preference:preference:1.2.1'
145

146
    // SHA-3
147
    implementation 'com.github.aelstad:keccakj:1.1.0'
148

149
    // AdaptiveRecyclerView
150
    implementation 'com.github.fartem:adaptive-recycler-view:1.1.1'
151

152
    // Dagger
153
    implementation 'com.google.dagger:dagger:2.40.2'
154
    annotationProcessor 'com.google.dagger:dagger-compiler:2.40.2'
155
    androidTestAnnotationProcessor 'com.google.dagger:dagger-compiler:2.40.2'
156

157
    // ORMLite
158
    implementation 'com.j256.ormlite:ormlite-core:5.7'
159
    implementation 'com.j256.ormlite:ormlite-android:5.7'
160

161
    // Checkstyle
162
//    checkstyle 'com.github.fartem:checkstyle-checks-java:1.1.0'
163
//    checkstyle 'com.github.fartem:checkstyle-checks-android:1.2.3'
164

165
    // Unit tests
166
    testImplementation 'junit:junit:4.13.2'
167

168
    // Android tests
169
    androidTestImplementation 'androidx.annotation:annotation:1.3.0'
170
    androidTestImplementation 'androidx.test:runner:1.4.0'
171
    androidTestImplementation 'androidx.test:rules:1.4.0'
172
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
173
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0'
174

175
    // Screenshots
176
//    androidTestImplementation 'tools.fastlane:screengrab:2.1.1'
177

178
    // Google Play Core Library
179
    googlePlayImplementation 'com.google.android.play:core:1.10.3'
180
}
181

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.