Skip to content
This repository was archived by the owner on Jan 11, 2024. It is now read-only.

Project Compilation Error #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions RecyclerViewFundamentals-Starter/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs'

android {
compileSdkVersion 30
compileSdkVersion 31
defaultConfig {
applicationId "com.example.android.trackmysleepquality"
minSdkVersion 19
targetSdkVersion 30
minSdkVersion 21
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -37,7 +36,13 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
// Enables data binding.
buildFeatures {
dataBinding true
Expand All @@ -48,32 +53,27 @@ android {
dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// Support libraries
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.fragment:fragment-ktx:1.2.5"
implementation "androidx.constraintlayout:constraintlayout:2.0.2"
implementation "androidx.appcompat:appcompat:1.3.1"
implementation "androidx.fragment:fragment-ktx:1.3.6"
implementation "androidx.constraintlayout:constraintlayout:2.1.0"

// Android KTX
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.core:core-ktx:1.6.0'

// Room and Lifecycle dependencies
implementation "androidx.room:room-runtime:$room_version"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"

// Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$room_version"

// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version"

// Navigation
implementation "android.arch.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "android.arch.navigation:navigation-ui-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
android:roundIcon="@mipmap/ic_launcher_sleep_tracker_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
12 changes: 7 additions & 5 deletions RecyclerViewFundamentals-Starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,25 @@
buildscript {

ext {
kotlin_version = '1.4.10'
kotlin_version = '1.5.30'
archLifecycleVersion = '1.1.1'
room_version = '2.2.5'
room_version = '2.4.0-alpha04'
coroutine_version = '1.3.7'
gradleVersion = '4.1.0'
navigationVersion = '2.3.1'
gradleVersion = '7.0.2'
nav_version = '2.3.5'
dataBindingCompilerVersion = gradleVersion // Always need to be the same.
}

repositories {
google()
mavenCentral()
jcenter()
}

dependencies {
classpath "com.android.tools.build:gradle:$gradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -46,6 +47,7 @@ buildscript {
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
Expand Down
8 changes: 7 additions & 1 deletion RecyclerViewFundamentals-Starter/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip