Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit 60e4f67

Browse files
committed
update: build.gradle
1 parent 1d3c0a3 commit 60e4f67

File tree

3 files changed

+56
-38
lines changed

3 files changed

+56
-38
lines changed

app/build.gradle

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
33
apply plugin: 'kotlin-android-extensions'
4+
apply plugin: 'kotlin-kapt'
45

56
android {
7+
8+
def versionMajor = 1
9+
def versionMinor = 0
10+
def versionPatch = 1
11+
12+
def projectVersionCode = (versionMajor*100) + (versionMinor*10) + (versionPatch*1)
13+
def projectVersionName = "$versionMajor.$versionMinor.$versionPatch"
14+
15+
compileOptions {
16+
sourceCompatibility JavaVersion.VERSION_1_8
17+
targetCompatibility JavaVersion.VERSION_1_8
18+
}
19+
620
compileSdkVersion 29
721
buildToolsVersion "29.0.3"
822

923
defaultConfig {
1024
applicationId "com.frogobox.themealsapi"
1125
minSdkVersion 21
1226
targetSdkVersion 29
13-
versionCode 1
14-
versionName "1.0"
27+
versionCode projectVersionCode
28+
versionName projectVersionName
1529

1630
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1731
}
@@ -32,9 +46,22 @@ dependencies {
3246
implementation 'androidx.core:core-ktx:1.2.0'
3347
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
3448

35-
implementation project(':frogothemealdbapi')
49+
// library google
50+
implementation 'com.google.code.gson:gson:2.8.6'
51+
implementation 'com.google.android.material:material:1.1.0'
52+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3653

37-
testImplementation 'junit:junit:4.12'
54+
// Glide
55+
implementation 'com.github.bumptech.glide:glide:4.11.0'
56+
kapt 'com.github.bumptech.glide:compiler:4.11.0'
57+
58+
// library frogo-recycler-view
59+
implementation 'com.github.amirisback:frogo-recycler-view:2.2.4'
60+
61+
testImplementation 'junit:junit:4.13'
3862
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
3963
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
64+
65+
implementation project(':frogothemealdbapi')
66+
4067
}

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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.70'
4+
ext.kotlin_version = '1.3.72'
55
repositories {
66
google()
77
jcenter()
88

99
}
1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.6.1'
11+
classpath 'com.android.tools.build:gradle:3.6.3'
1212
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1313

1414
// NOTE: Do not place your application dependencies here; they belong
@@ -20,7 +20,7 @@ allprojects {
2020
repositories {
2121
google()
2222
jcenter()
23-
23+
maven { url 'https://jitpack.io' }
2424
}
2525
}
2626

frogothemealdbapi/build.gradle

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,31 @@ apply plugin: 'kotlin-android-extensions'
44
apply plugin: 'kotlin-kapt'
55

66
android {
7+
8+
def versionMajor = 1
9+
def versionMinor = 0
10+
def versionPatch = 1
11+
12+
def projectVersionCode = (versionMajor*100) + (versionMinor*10) + (versionPatch*1)
13+
def projectVersionName = "$versionMajor.$versionMinor.$versionPatch"
14+
15+
compileOptions {
16+
sourceCompatibility JavaVersion.VERSION_1_8
17+
targetCompatibility JavaVersion.VERSION_1_8
18+
}
19+
20+
kotlinOptions {
21+
jvmTarget = JavaVersion.VERSION_1_8.toString()
22+
}
23+
724
compileSdkVersion 29
825
buildToolsVersion "29.0.3"
926

1027
defaultConfig {
1128
minSdkVersion 21
1229
targetSdkVersion 29
13-
versionCode 1
14-
versionName "1.0"
30+
versionCode projectVersionCode
31+
versionName projectVersionName
1532

1633
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1734
consumerProguardFiles 'consumer-rules.pro'
@@ -29,46 +46,20 @@ android {
2946
dependencies {
3047
implementation fileTree(dir: 'libs', include: ['*.jar'])
3148
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
32-
implementation 'androidx.appcompat:appcompat:1.1.0'
3349
implementation 'androidx.core:core-ktx:1.2.0'
34-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
50+
3551
implementation 'com.google.code.gson:gson:2.8.6'
36-
implementation 'com.google.android.material:material:1.2.0-alpha05'
37-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
3852

39-
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
53+
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
4054
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.0'
41-
implementation 'com.squareup.retrofit2:converter-moshi:2.6.0'
42-
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
43-
44-
implementation "com.squareup.moshi:moshi:1.8.0"
45-
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
55+
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
4656
implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'
4757

4858
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
4959

50-
// Room components
51-
implementation "androidx.room:room-runtime:2.2.4"
52-
implementation "androidx.room:room-ktx:2.2.4"
53-
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
54-
// ViewModel Kotlin support
55-
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
56-
//noinspection LifecycleAnnotationProcessorWithJava8
57-
kapt "androidx.lifecycle:lifecycle-compiler:2.2.0"
58-
59-
kapt "androidx.room:room-compiler:2.2.4"
60-
implementation "androidx.room:room-ktx:2.2.4"
61-
implementation "androidx.room:room-rxjava2:2.2.4"
62-
implementation "androidx.room:room-guava:2.2.4"
63-
testImplementation "androidx.room:room-testing:2.2.4"
64-
6560
implementation 'com.readystatesoftware.chuck:library:1.1.0'
6661

6762
testImplementation 'junit:junit:4.13'
6863
androidTestImplementation 'androidx.test:runner:1.2.0'
6964
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
70-
71-
androidExtensions {
72-
experimental = true
73-
}
7465
}

0 commit comments

Comments
 (0)