mirror of
https://github.com/Skysamara/android-kotlin-fundamentals-apps.git
synced 2025-12-06 06:16:03 +00:00
104 lines
3.4 KiB
Groovy
Executable File
104 lines
3.4 KiB
Groovy
Executable File
/*
|
|
* Copyright (C) 2019 Google Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: "androidx.navigation.safeargs"
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
defaultConfig {
|
|
applicationId "com.example.android.devbyteviewer"
|
|
minSdkVersion 19
|
|
targetSdkVersion 28
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables.useSupportLibrary = true
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
|
|
dataBinding {
|
|
enabled = true
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
|
|
|
// support libraries
|
|
implementation 'androidx.appcompat:appcompat:1.0.2'
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
implementation 'com.google.android.material:material:1.0.0'
|
|
|
|
// Android KTX
|
|
implementation 'androidx.core:core-ktx:1.0.2'
|
|
|
|
// constraint layout
|
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
|
|
// navigation
|
|
def nav_version = "1.0.0"
|
|
implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version"
|
|
implementation "android.arch.navigation:navigation-ui-ktx:$nav_version"
|
|
|
|
// coroutines for getting off the UI thread
|
|
def coroutines = "1.0.1"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
|
|
|
|
// retrofit for networking
|
|
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
|
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
|
|
implementation 'com.squareup.retrofit2:converter-moshi:2.5.0'
|
|
|
|
// moshi for parsing the JSON format
|
|
def moshi_version = "1.6.0"
|
|
implementation "com.squareup.moshi:moshi:$moshi_version"
|
|
implementation "com.squareup.moshi:moshi-kotlin:$moshi_version"
|
|
kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshi_version"
|
|
|
|
// joda time library for dealing with time
|
|
implementation 'joda-time:joda-time:2.10'
|
|
|
|
// arch components
|
|
// ViewModel and LiveData
|
|
def lifecycle_version = "2.2.0-alpha01"
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
|
|
// logging
|
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
|
|
|
// glide for images
|
|
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
|
kapt 'com.github.bumptech.glide:compiler:4.7.1'
|
|
|
|
// Room dependency
|
|
def room_version = "2.1.0-beta01"
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
|
|
}
|