Skip to content

Commit 9cb3e6a

Browse files
committed
update: build.gradle
1 parent 883a32d commit 9cb3e6a

File tree

3 files changed

+82
-44
lines changed

3 files changed

+82
-44
lines changed

app/build.gradle

Lines changed: 67 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,109 @@
11
apply plugin: 'com.android.application'
2-
32
apply plugin: 'kotlin-android'
4-
53
apply plugin: 'kotlin-android-extensions'
64

75
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+
942
defaultConfig {
10-
applicationId "com.frogobox.frogoboxnews"
43+
applicationId projectApplicationId
1144
minSdkVersion 21
12-
targetSdkVersion 28
13-
versionCode 1
14-
versionName "1.0"
45+
targetSdkVersion 30
46+
versionCode projectVersionCode
47+
versionName projectVersionName
48+
multiDexEnabled true
1549
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1650

51+
// Naming APK // AAB
52+
setProperty("archivesBaseName", nameAPK + versionName + "#" + versionCode + "-"
53+
+ new Date().format('ddMMyy'))
54+
55+
resConfigs "en", "id"
56+
1757
buildConfigField("String", "NEWS_API_KEY", '"84d090d0537548ee8ac77620217b1b52"')
1858
buildConfigField("String", "NEWS_BASE_URL", '"https://newsapi.org"')
1959
buildConfigField("String", "NEWS_API_VERSION", '"/v2"')
2060

21-
2261
}
62+
2363
buildTypes {
2464
release {
2565
minifyEnabled false
2666
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
2767
}
28-
}
29-
}
3068

31-
ext {
32-
lifecycle_version = "2.0.0"
33-
coroutine_version = "1.1.0"
69+
}
3470
}
3571

3672

3773
dependencies {
3874
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"
3978

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'
4382
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
4483
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
45-
implementation 'com.google.android.material:material:1.1.0-alpha05'
4684

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'
5086

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"
5687

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'
5890

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'
6395

6496
implementation 'com.squareup.picasso:picasso:2.71828'
6597
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'
68100

69101
implementation 'com.jakewharton.timber:timber:4.7.0'
70102
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
71103

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'
75107

76108
androidExtensions {
77109
experimental = true

build.gradle

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.3.30'
5-
ext.kotlin_version = '1.3.11'
4+
5+
ext {
6+
kotlin_version = '1.5.20'
7+
lifecycle_version = "2.2.0"
8+
coroutine_version = "1.5.0"
9+
}
10+
611
repositories {
712
google()
813
jcenter()
9-
14+
mavenCentral()
1015
}
16+
1117
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.4.0'
18+
classpath 'com.android.tools.build:gradle:4.2.2'
1319
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1420
// NOTE: Do not place your application dependencies here; they belong
1521
// in the individual module build.gradle files
1622
}
23+
1724
}
1825

1926
allprojects {
2027
repositories {
2128
google()
2229
jcenter()
23-
maven {
24-
url "https://mymavenrepo.com/repo/b43WL8yemJ2Ek6dbH24V/"
25-
}
26-
30+
mavenCentral()
31+
maven { url 'https://mymavenrepo.com/repo/b43WL8yemJ2Ek6dbH24V/' }
32+
maven { url 'https://jitpack.io' }
2733
}
2834
}
2935

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip

0 commit comments

Comments
 (0)