|
1 | 1 | apply plugin: 'com.android.application'
|
2 |
| - |
3 | 2 | apply plugin: 'kotlin-android'
|
4 |
| - |
5 | 3 | apply plugin: 'kotlin-android-extensions'
|
6 | 4 |
|
7 | 5 | android {
|
8 |
| - compileSdkVersion 28 |
| 6 | + |
| 7 | + def versionMajor = 1 |
| 8 | + def versionMinor = 0 |
| 9 | + def versionPatch = 0 |
| 10 | + |
| 11 | + def appDomain = "com" |
| 12 | + def appDevConsole = "frogobox" |
| 13 | + def appName = "frogoboxnews" |
| 14 | + |
| 15 | + def projectApplicationId = "$appDomain.$appDevConsole.$appName" |
| 16 | + def projectVersionCode = (versionMajor * 100) + (versionMinor * 10) + (versionPatch * 1) |
| 17 | + def projectVersionName = "$versionMajor.$versionMinor.$versionPatch" |
| 18 | + |
| 19 | + // Declaration app name |
| 20 | + def nameApp = "Kick Start" |
| 21 | + def nameAppLower = nameApp.toLowerCase() |
| 22 | + |
| 23 | + // Declaration apk / aab name |
| 24 | + def nameAPK = nameAppLower.replace(" ", "-") |
| 25 | + |
| 26 | + compileOptions { |
| 27 | + sourceCompatibility JavaVersion.VERSION_1_8 |
| 28 | + targetCompatibility JavaVersion.VERSION_1_8 |
| 29 | + } |
| 30 | + |
| 31 | + kotlinOptions { |
| 32 | + jvmTarget = '1.8' |
| 33 | + } |
| 34 | + |
| 35 | + buildFeatures { |
| 36 | + viewBinding = true |
| 37 | + } |
| 38 | + |
| 39 | + compileSdkVersion 30 |
| 40 | + buildToolsVersion "30.0.3" |
| 41 | + |
9 | 42 | defaultConfig {
|
10 |
| - applicationId "com.frogobox.frogoboxnews" |
| 43 | + applicationId projectApplicationId |
11 | 44 | minSdkVersion 21
|
12 |
| - targetSdkVersion 28 |
13 |
| - versionCode 1 |
14 |
| - versionName "1.0" |
| 45 | + targetSdkVersion 30 |
| 46 | + versionCode projectVersionCode |
| 47 | + versionName projectVersionName |
| 48 | + multiDexEnabled true |
15 | 49 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
16 | 50 |
|
| 51 | + // Naming APK // AAB |
| 52 | + setProperty("archivesBaseName", nameAPK + versionName + "#" + versionCode + "-" |
| 53 | + + new Date().format('ddMMyy')) |
| 54 | + |
| 55 | + resConfigs "en", "id" |
| 56 | + |
17 | 57 | buildConfigField("String", "NEWS_API_KEY", '"84d090d0537548ee8ac77620217b1b52"')
|
18 | 58 | buildConfigField("String", "NEWS_BASE_URL", '"https://newsapi.org"')
|
19 | 59 | buildConfigField("String", "NEWS_API_VERSION", '"/v2"')
|
20 | 60 |
|
21 |
| - |
22 | 61 | }
|
| 62 | + |
23 | 63 | buildTypes {
|
24 | 64 | release {
|
25 | 65 | minifyEnabled false
|
26 | 66 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
27 | 67 | }
|
28 |
| - } |
29 |
| -} |
30 | 68 |
|
31 |
| -ext { |
32 |
| - lifecycle_version = "2.0.0" |
33 |
| - coroutine_version = "1.1.0" |
| 69 | + } |
34 | 70 | }
|
35 | 71 |
|
36 | 72 |
|
37 | 73 | dependencies {
|
38 | 74 | implementation fileTree(dir: 'libs', include: ['*.jar'])
|
| 75 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| 76 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" |
| 77 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" |
39 | 78 |
|
40 |
| - implementation 'androidx.appcompat:appcompat:1.1.0-alpha04' |
41 |
| - implementation 'androidx.constraintlayout:constraintlayout:1.1.3' |
42 |
| - implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha04' |
| 79 | + implementation 'androidx.appcompat:appcompat:1.4.0-alpha02' |
| 80 | + implementation 'androidx.constraintlayout:constraintlayout:2.0.4' |
| 81 | + implementation 'androidx.recyclerview:recyclerview:1.2.1' |
43 | 82 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
44 | 83 | implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
45 |
| - implementation 'com.google.android.material:material:1.1.0-alpha05' |
46 | 84 |
|
47 |
| - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
48 |
| - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" |
49 |
| - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" |
| 85 | + implementation 'com.google.android.material:material:1.4.0-rc01' |
50 | 86 |
|
51 |
| - implementation "org.jetbrains.anko:anko:0.10.8" |
52 |
| - implementation "org.jetbrains.anko:anko-appcompat-v7-commons:0.10.8" |
53 |
| - implementation "org.jetbrains.anko:anko-appcompat-v7:0.10.8" |
54 |
| - implementation "org.jetbrains.anko:anko-design:0.10.8" |
55 |
| - implementation "org.jetbrains.anko:anko-design-coroutines:0.10.8" |
56 | 87 |
|
57 |
| - implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' |
| 88 | + implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' |
| 89 | + implementation 'io.reactivex.rxjava2:rxjava:2.2.12' |
58 | 90 |
|
59 |
| - implementation 'com.squareup.retrofit2:retrofit:2.5.0' |
60 |
| - implementation 'com.squareup.retrofit2:adapter-rxjava2:2.5.0' |
61 |
| - implementation 'com.squareup.retrofit2:converter-moshi:2.5.0' |
62 |
| - implementation 'com.squareup.retrofit2:converter-gson:2.5.0' |
| 91 | + implementation 'com.squareup.retrofit2:retrofit:2.9.0' |
| 92 | + implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0' |
| 93 | + implementation 'com.squareup.retrofit2:converter-moshi:2.6.0' |
| 94 | + implementation 'com.squareup.retrofit2:converter-gson:2.9.0' |
63 | 95 |
|
64 | 96 | implementation 'com.squareup.picasso:picasso:2.71828'
|
65 | 97 | implementation "com.squareup.moshi:moshi:1.8.0"
|
66 |
| - implementation 'com.squareup.okhttp3:okhttp:3.12.1' |
67 |
| - implementation 'com.squareup.okhttp3:logging-interceptor:3.12.1' |
| 98 | + implementation 'com.squareup.okhttp3:okhttp:4.9.0' |
| 99 | + implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0' |
68 | 100 |
|
69 | 101 | implementation 'com.jakewharton.timber:timber:4.7.0'
|
70 | 102 | implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
|
71 | 103 |
|
72 |
| - testImplementation 'junit:junit:4.12' |
73 |
| - androidTestImplementation 'androidx.test:runner:1.2.0-alpha03' |
74 |
| - androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-alpha03' |
| 104 | + testImplementation 'junit:junit:4.13.2' |
| 105 | + androidTestImplementation 'androidx.test:runner:1.4.0-rc01' |
| 106 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-rc01' |
75 | 107 |
|
76 | 108 | androidExtensions {
|
77 | 109 | experimental = true
|
|
0 commit comments