build.gradle 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright 2018, The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. apply plugin: 'com.android.application'
  17. apply plugin: 'kotlin-android'
  18. apply plugin: 'kotlin-kapt'
  19. apply plugin: 'androidx.navigation.safeargs'
  20. android {
  21. compileSdkVersion 30
  22. defaultConfig {
  23. applicationId "com.example.android.trackmysleepquality"
  24. minSdkVersion 19
  25. targetSdkVersion 30
  26. versionCode 1
  27. versionName "1.0"
  28. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  29. vectorDrawables.useSupportLibrary = true
  30. }
  31. buildTypes {
  32. release {
  33. minifyEnabled false
  34. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  35. }
  36. }
  37. // Enables data binding.
  38. buildFeatures {
  39. dataBinding true
  40. }
  41. }
  42. dependencies {
  43. implementation fileTree(dir: 'libs', include: ['*.jar'])
  44. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$version_kotlin"
  45. // Support libraries
  46. implementation "androidx.constraintlayout:constraintlayout:$version_constraint_layout"
  47. // Android KTX
  48. implementation "androidx.core:core-ktx:$version_core"
  49. // Room and Lifecycle dependencies
  50. implementation "androidx.room:room-runtime:$version_room"
  51. kapt "androidx.room:room-compiler:$version_room"
  52. implementation "androidx.lifecycle:lifecycle-extensions:$version_lifecycle_extensions"
  53. // Coroutines
  54. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_coroutine"
  55. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_coroutine"
  56. // Navigation
  57. implementation "androidx.navigation:navigation-fragment-ktx:$version_navigation"
  58. implementation "androidx.navigation:navigation-ui-ktx:$version_navigation"
  59. // Testing
  60. testImplementation 'junit:junit:4.13.1'
  61. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  62. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  63. }