diff --git a/starter/app/build.gradle b/starter/app/build.gradle
index f0d6a130b..5ce719d8a 100644
--- a/starter/app/build.gradle
+++ b/starter/app/build.gradle
@@ -1,17 +1,19 @@
-apply plugin: 'com.android.application'
-
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-kapt'
-apply plugin: 'androidx.navigation.safeargs'
-apply plugin: 'kotlin-android-extensions'
+plugins {
+ id 'com.android.application'
+ id 'kotlin-android'
+ id 'kotlin-kapt'
+ id 'androidx.navigation.safeargs'
+ id 'kotlin-parcelize'
+}
android {
- compileSdkVersion 30
- buildToolsVersion "29.0.3"
+ namespace 'com.udacity.asteroidradar'
+ compileSdk 33
+
defaultConfig {
applicationId "com.udacity.asteroidradar"
- minSdkVersion 21
- targetSdkVersion 30
+ minSdkVersion 24
+ targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -35,41 +37,45 @@ android {
}
dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
- implementation 'androidx.appcompat:appcompat:1.2.0'
- implementation 'androidx.core:core-ktx:1.3.1'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1'
+ // Design
+ implementation "androidx.appcompat:appcompat:$version_appcompat"
+ implementation "androidx.constraintlayout:constraintlayout:$version_constraint_layout"
- implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0"
- implementation 'androidx.fragment:fragment-ktx:1.2.5'
+ // Core with Ktx
+ implementation "androidx.core:core-ktx:$version_core"
- implementation "android.arch.navigation:navigation-fragment-ktx:1.0.0"
- implementation "android.arch.navigation:navigation-ui-ktx:1.0.0"
+ // ViewModel and LiveData
+ implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$version_lifecycle"
- implementation "com.squareup.moshi:moshi:1.8.0"
- implementation "com.squareup.moshi:moshi-kotlin:1.8.0"
+ // Retrofit with Moshi Converter
+ implementation "com.squareup.retrofit2:retrofit:$version_retrofit"
+ implementation "com.squareup.retrofit2:converter-moshi:$version_retrofit"
+ implementation "com.squareup.retrofit2:converter-scalars:$version_retrofit"
- implementation "com.squareup.retrofit2:retrofit:2.6.2"
- implementation "com.squareup.retrofit2:converter-moshi:2.5.0"
- implementation 'com.squareup.retrofit2:converter-scalars:2.5.0'
+ // Moshi
+ implementation "com.squareup.moshi:moshi:$version_moshi"
+ implementation "com.squareup.moshi:moshi-kotlin:$version_moshi"
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
- implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
+ // Navigation
+ implementation "androidx.navigation:navigation-fragment-ktx:$version_navigation"
+ implementation "androidx.navigation:navigation-ui-ktx:$version_navigation"
- implementation "androidx.recyclerview:recyclerview:1.1.0"
+ // Room database
+ implementation "androidx.room:room-runtime:$version_room"
+ kapt "androidx.room:room-compiler:$version_room"
+ // Kotlin Extensions and Coroutines support for Room
+ implementation "androidx.room:room-ktx:$version_room"
+ // Glide
+ implementation "com.github.bumptech.glide:glide:$version_glide"
+ annotationProcessor "com.github.bumptech.glide:compiler:$version_glide"
implementation 'com.squareup.picasso:picasso:2.5.2'
- implementation("androidx.room:room-ktx:2.3.0-alpha01")
- implementation "androidx.room:room-runtime:2.3.0-alpha01"
- kapt "androidx.room:room-compiler:2.3.0-alpha01"
-
- implementation "android.arch.work:work-runtime-ktx:1.0.1"
+ // WorkManager
+ implementation "androidx.work:work-runtime-ktx:$version_work"
- testImplementation 'junit:junit:4.13'
- androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+ // Tests
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.5'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
diff --git a/starter/app/src/main/AndroidManifest.xml b/starter/app/src/main/AndroidManifest.xml
index 622d67b91..08c89730e 100644
--- a/starter/app/src/main/AndroidManifest.xml
+++ b/starter/app/src/main/AndroidManifest.xml
@@ -3,6 +3,7 @@
package="com.udacity.asteroidradar">
+
-
+
-
-
\ No newline at end of file
diff --git a/starter/build.gradle b/starter/build.gradle
index c7238635b..27b244d0e 100644
--- a/starter/build.gradle
+++ b/starter/build.gradle
@@ -1,29 +1,33 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
buildscript {
- ext.kotlin_version = '1.3.72'
+ ext {
+ version_core = "1.10.1"
+ version_constraint_layout = "2.1.4"
+ version_gradle = '7.3.1'
+ version_kotlin = "1.8.0"
+ version_lifecycle = "2.6.1"
+ version_navigation = '2.5.3'
+ version_glide = "4.14.2"
+ version_moshi = "1.9.3"
+ version_retrofit = "2.9.0"
+ version_recyclerview = "1.3.0-rc01"
+ version_work = "2.8.1"
+ version_room = "2.5.1"
+ version_appcompat = "1.6.1"
+ version_moshi = "1.9.3"
+ version_glide = "4.14.2"
+ }
+
repositories {
+ mavenCentral()
google()
- jcenter()
-
}
dependencies {
- classpath 'com.android.tools.build:gradle:4.0.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
+ classpath 'com.android.tools.build:gradle:7.3.1'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0"
+ 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 {
- google()
- jcenter()
-
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
+}
\ No newline at end of file
diff --git a/starter/settings.gradle b/starter/settings.gradle
index ff7b4f4b6..420435069 100644
--- a/starter/settings.gradle
+++ b/starter/settings.gradle
@@ -1,2 +1,16 @@
-include ':app'
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ google()
+ mavenCentral()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
rootProject.name='Asteroid Radar'
+include ':app'