|
| 1 | +apply plugin: 'com.android.application' |
| 2 | +apply plugin: 'kotlin-android' |
| 3 | +apply plugin: 'kotlin-kapt' |
| 4 | +apply plugin: 'kotlin-parcelize' |
| 5 | +apply plugin: 'com.google.gms.google-services' |
| 6 | +apply plugin: 'com.google.firebase.crashlytics' |
| 7 | + |
| 8 | +android { |
| 9 | + namespace 'ru.rznnike.eyehealthmanager' |
| 10 | + |
| 11 | + compileSdkVersion TARGET_SDK |
| 12 | + buildToolsVersion '33.0.0' |
| 13 | + |
| 14 | + defaultConfig { |
| 15 | + applicationId 'ru.rznnike.eyehealthmanager' |
| 16 | + minSdkVersion MIN_SDK |
| 17 | + targetSdkVersion TARGET_SDK |
| 18 | + versionCode VERSION_CODE |
| 19 | + versionName VERSION_NAME |
| 20 | + } |
| 21 | + |
| 22 | + signingConfigs { |
| 23 | + config { |
| 24 | + storeFile file('../eyehealthmanager.jks') |
| 25 | + keyAlias 'eyehealthmanager' |
| 26 | + Properties localProperties = new Properties() |
| 27 | + localProperties.load(file('../local.properties').newDataInputStream()) |
| 28 | + if ((localProperties.getProperty('PROJECT_KEY_PASSWORD') != null) && (localProperties.getProperty('PROJECT_KEYSTORE_PASSWORD') != null)) { |
| 29 | + keyPassword localProperties.getProperty('PROJECT_KEY_PASSWORD') |
| 30 | + storePassword localProperties.getProperty('PROJECT_KEYSTORE_PASSWORD') |
| 31 | + } else { |
| 32 | + throw new GradleException('Not found signing config password properties') |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | + |
| 37 | + buildTypes { |
| 38 | + debug { |
| 39 | + minifyEnabled false |
| 40 | + signingConfig signingConfigs.config |
| 41 | + manifestPlaceholders = [enableCrashReporting: 'false'] |
| 42 | + versionNameSuffix " debug" |
| 43 | + } |
| 44 | + staging { |
| 45 | + minifyEnabled true |
| 46 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 47 | + signingConfig signingConfigs.config |
| 48 | + manifestPlaceholders = [enableCrashReporting: 'true'] |
| 49 | + versionNameSuffix " staging" |
| 50 | + } |
| 51 | + release { |
| 52 | + minifyEnabled true |
| 53 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 54 | + signingConfig signingConfigs.config |
| 55 | + manifestPlaceholders = [enableCrashReporting: 'true'] |
| 56 | + versionNameSuffix "" |
| 57 | + } |
| 58 | + } |
| 59 | + |
| 60 | + lint { |
| 61 | + abortOnError true |
| 62 | + checkAllWarnings true |
| 63 | + ignoreWarnings false |
| 64 | + warningsAsErrors false |
| 65 | + checkDependencies true |
| 66 | + htmlReport true |
| 67 | + explainIssues true |
| 68 | + noLines false |
| 69 | + textOutput file('stdout') |
| 70 | + disable 'MissingClass', 'NewApi' |
| 71 | + } |
| 72 | + |
| 73 | + applicationVariants.all { variant -> |
| 74 | + variant.outputs.all { |
| 75 | + outputFileName = "${APK_NAME} ${variant.versionName} ${name}.apk" |
| 76 | + } |
| 77 | + } |
| 78 | + afterEvaluate { |
| 79 | + applicationVariants.all { |
| 80 | + variant -> |
| 81 | + def variantName = variant.name.capitalize() |
| 82 | + if (variantName != 'Debug') { |
| 83 | + project.tasks["compile${variantName}Sources"].dependsOn(project.tasks["lint${variantName}"]) |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + compileOptions { |
| 88 | + coreLibraryDesugaringEnabled true |
| 89 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 90 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 91 | + } |
| 92 | + kotlinOptions { |
| 93 | + jvmTarget = JavaVersion.VERSION_1_8.toString() |
| 94 | + freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn" |
| 95 | + } |
| 96 | + buildFeatures { |
| 97 | + viewBinding true |
| 98 | + } |
| 99 | + bundle { |
| 100 | + abi.enableSplit = false |
| 101 | + language.enableSplit = false |
| 102 | + } |
| 103 | +} |
| 104 | + |
| 105 | +dependencies { |
| 106 | + implementation project(':data') |
| 107 | + implementation project(':domain') |
| 108 | + implementation project(':device') |
| 109 | + implementation project(':resources') |
| 110 | + |
| 111 | + // Desugaring |
| 112 | + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' |
| 113 | + |
| 114 | + // AndroidX |
| 115 | + implementation 'androidx.appcompat:appcompat:1.5.1' |
| 116 | + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' |
| 117 | + implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' |
| 118 | + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' |
| 119 | + implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' |
| 120 | + implementation 'androidx.preference:preference-ktx:1.2.0' |
| 121 | + implementation "androidx.viewpager2:viewpager2:1.1.0-beta01" |
| 122 | + implementation "androidx.annotation:annotation:1.5.0" |
| 123 | + implementation 'androidx.fragment:fragment-ktx:1.5.4' |
| 124 | + implementation "androidx.window:window:1.0.0" |
| 125 | + |
| 126 | + // Coroutines |
| 127 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" |
| 128 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" |
| 129 | + |
| 130 | + // Material |
| 131 | + implementation 'com.google.android.material:material:1.7.0' |
| 132 | + |
| 133 | + // Firebase |
| 134 | + implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.2' |
| 135 | + implementation 'com.google.firebase:firebase-messaging:23.1.0' |
| 136 | + |
| 137 | + // Koin |
| 138 | + // https://github.com/InsertKoinIO/koin |
| 139 | + implementation "io.insert-koin:koin-core:$koinVersion" |
| 140 | + implementation "io.insert-koin:koin-android:$koinVersion" |
| 141 | + |
| 142 | + // Moxy MVP |
| 143 | + // https://github.com/moxy-community/Moxy |
| 144 | + def moxyVersion = '2.2.2' |
| 145 | + implementation "com.github.moxy-community:moxy:$moxyVersion" |
| 146 | + kapt "com.github.moxy-community:moxy-compiler:$moxyVersion" |
| 147 | + implementation "com.github.moxy-community:moxy-androidx:$moxyVersion" |
| 148 | + implementation "com.github.moxy-community:moxy-material:$moxyVersion" |
| 149 | + implementation "com.github.moxy-community:moxy-ktx:$moxyVersion" |
| 150 | + |
| 151 | + // Cicerone navigation |
| 152 | + // https://github.com/terrakok/Cicerone |
| 153 | + implementation 'com.github.terrakok:cicerone:7.1' |
| 154 | + |
| 155 | + // FastAdapter |
| 156 | + // https://github.com/mikepenz/FastAdapter |
| 157 | + def fastAdapterVersion = '5.7.0' |
| 158 | + implementation "com.mikepenz:fastadapter:$fastAdapterVersion" |
| 159 | + implementation "com.mikepenz:fastadapter-extensions-diff:$fastAdapterVersion" |
| 160 | + implementation "com.mikepenz:fastadapter-extensions-drag:$fastAdapterVersion" |
| 161 | + implementation "com.mikepenz:fastadapter-extensions-scroll:$fastAdapterVersion" |
| 162 | + implementation "com.mikepenz:fastadapter-extensions-swipe:$fastAdapterVersion" |
| 163 | + implementation "com.mikepenz:fastadapter-extensions-ui:$fastAdapterVersion" |
| 164 | + implementation "com.mikepenz:fastadapter-extensions-utils:$fastAdapterVersion" |
| 165 | + implementation "com.mikepenz:fastadapter-extensions-binding:$fastAdapterVersion" |
| 166 | + |
| 167 | + // Image loader |
| 168 | + // https://github.com/coil-kt/coil |
| 169 | + implementation "io.coil-kt:coil:2.2.2" |
| 170 | + |
| 171 | + // Language |
| 172 | + // https://github.com/YarikSOffice/lingver |
| 173 | + implementation "com.github.YarikSOffice:lingver:1.3.0" |
| 174 | + |
| 175 | + // MPAndroidChart |
| 176 | + // https://github.com/PhilJay/MPAndroidChart |
| 177 | + implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0' |
| 178 | + |
| 179 | + // Reflection |
| 180 | + implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion" |
| 181 | + |
| 182 | + // ViewBinding |
| 183 | + // https://github.com/kirich1409/ViewBindingPropertyDelegate |
| 184 | + implementation 'com.github.kirich1409:viewbindingpropertydelegate-noreflection:1.5.6' |
| 185 | + |
| 186 | + // ExpandableLayout |
| 187 | + // https://github.com/cachapa/ExpandableLayout |
| 188 | + implementation 'com.github.cachapa:ExpandableLayout:2.9.2' |
| 189 | + |
| 190 | + // GestureViews |
| 191 | + // https://github.com/alexvasilkov/GestureViews |
| 192 | + implementation "com.alexvasilkov:gesture-views:2.8.3" |
| 193 | + |
| 194 | + // FlexboxLayoutManager |
| 195 | + // https://github.com/google/flexbox-layout |
| 196 | + implementation 'com.google.android.flexbox:flexbox:3.0.0' |
| 197 | +} |
0 commit comments