Skip to content

Commit

Permalink
Code updated to run on SDK 33 and Gradle 7.5
Browse files Browse the repository at this point in the history
  • Loading branch information
graffiti75 committed May 18, 2023
1 parent 2f3e360 commit c18d15b
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 61 deletions.
80 changes: 43 additions & 37 deletions starter/app/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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'
}
7 changes: 4 additions & 3 deletions starter/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package="com.udacity.asteroidradar">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
Expand All @@ -11,13 +12,13 @@
android:roundIcon="@mipmap/ic_launcher_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" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
44 changes: 24 additions & 20 deletions starter/build.gradle
Original file line number Diff line number Diff line change
@@ -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
}
}
16 changes: 15 additions & 1 deletion starter/settings.gradle
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit c18d15b

Please sign in to comment.