Skip to content

Instantly share code, notes, and snippets.

@graffiti75
Created January 19, 2023 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save graffiti75/c816f601d94c734d5d1293e172b8e6a3 to your computer and use it in GitHub Desktop.
Save graffiti75/c816f601d94c734d5d1293e172b8e6a3 to your computer and use it in GitHub Desktop.
/*
* Copyright 2018, The Android Open Source Project
*
* 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.
*/
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-android-extensions'
id 'kotlin-android'
id 'kotlin-kapt'
id "androidx.navigation.safeargs"
}
android {
namespace 'com.example.android.trackmysleepquality'
compileSdk 33
defaultConfig {
applicationId "com.example.android.trackmysleepquality"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// Enables data binding.
buildFeatures {
dataBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$version_kotlin"
// Support libraries
implementation "androidx.constraintlayout:constraintlayout:$version_constraint_layout"
// Android KTX
implementation "androidx.core:core-ktx:$version_core"
// Room and Lifecycle dependencies
implementation "androidx.room:room-runtime:2.5.0" // version_room
kapt "androidx.room:room-compiler:2.5.0" // version_room
implementation "androidx.lifecycle:lifecycle-extensions:$version_lifecycle_extensions"
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_coroutine"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_coroutine"
// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$version_navigation"
implementation "androidx.navigation:navigation-ui-ktx:$version_navigation"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$version_lifecycle"
// Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$version_room"
// Testing
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
/*
* Copyright 2018, The Android Open Source Project
*
* 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.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
version_core = "1.9.0"
version_coroutine = "1.6.4"
version_constraint_layout = "2.2.0-alpha05"
version_gradle = '7.3.1'
version_kotlin = "1.7.20"
version_lifecycle_extensions = "2.2.0"
version_lifecycle = "2.5.1"
version_navigation = '2.5.3'
version_room = "2.5.0"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:$version_gradle"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$version_kotlin"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment