Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
/local.properties
/.idea/workspace.xml
/.idea/libraries
/.idea/caches
/.idea/misc.xml
/.idea/gradle.xml
/.idea/modules.xml
/.idea/runConfigurations.xml
.DS_Store
/build
/captures
.externalNativeBuild
/.idea/navEditor.xml
Binary file removed .idea/caches/build_file_checksums.ser
Binary file not shown.
6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions .idea/gradle.xml

This file was deleted.

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions .idea/misc.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

128 changes: 89 additions & 39 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'androidx.navigation.safeargs.kotlin'

android {
compileSdkVersion 28
compileSdkVersion 30
defaultConfig {
applicationId "com.anshdeep.newsly"
minSdkVersion 19
targetSdkVersion 28
minSdkVersion 21
targetSdkVersion 30
versionCode 3
versionName "1.02"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -26,63 +25,114 @@ android {
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
// work-runtime-ktx 2.1.0 and above now requires Java 8
jvmTarget = "1.8"

}

dataBinding {
enabled = true
}

packagingOptions {
// Multiple dependency bring these files in. Exclude them to enable
// our test APK to build (has no effect on our AARs)
excludes += "/META-INF/AL2.0"
excludes += "/META-INF/LGPL2.1"
}
}

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

// Essential Support libraries
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'


// Lifecycle components
implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"

// RxJava/RxAndroid
implementation "io.reactivex.rxjava2:rxjava:2.1.14"
implementation "io.reactivex.rxjava2:rxandroid:2.0.2"
// Navigation Component
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"

// Dagger
implementation "com.google.dagger:dagger:2.16"
implementation "com.google.dagger:dagger-android:2.16"
implementation "com.google.dagger:dagger-android-support:2.16"
kapt "com.google.dagger:dagger-compiler:2.16"
kapt "com.google.dagger:dagger-android-processor:2.16"
// ViewPager 2
implementation "androidx.viewpager2:viewpager2:1.0.0"

// Android KTX
implementation "androidx.core:core-ktx:1.6.0"
implementation "androidx.fragment:fragment-ktx:1.3.6"

// Coroutines for getting off the UI thread
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0"

// Use viewModelScope from lifecycle-viewmodel-ktx
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0-alpha02"

// Moshi for parsing the JSON format
implementation "com.squareup.moshi:moshi:1.10.0"
implementation "com.squareup.moshi:moshi-kotlin:1.10.0"

// Hilt
kapt "com.google.dagger:hilt-android-compiler:2.35"
implementation "com.google.dagger:hilt-android:2.35"
kaptAndroidTest "com.google.dagger:hilt-android-compiler:2.35"
kapt("androidx.hilt:hilt-compiler:1.0.0")



// Utilities for effectively testing Coroutines.
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.2"

// Test
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation "androidx.arch.core:core-testing:2.1.0"
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// Glide
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

// Gson
implementation 'com.google.code.gson:gson:2.8.2'
// Picasso
implementation 'com.squareup.picasso:picasso:2.71828'

// Retrofit 2
implementation "com.squareup.retrofit2:retrofit:2.6.0"
implementation "com.squareup.retrofit2:adapter-rxjava2:2.4.0"
implementation "com.squareup.retrofit2:converter-gson:2.4.0"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-moshi:2.9.0"

// Room database
implementation "androidx.room:room-runtime:2.3.0"
implementation "androidx.room:room-ktx:2.3.0"
kapt "androidx.room:room-compiler:2.3.0"

// WorkManager
implementation "androidx.work:work-runtime-ktx:2.5.0"
implementation("androidx.hilt:hilt-work:1.0.0")


// Assisted injection for dagger 2
compileOnly 'com.squareup.inject:assisted-inject-annotations-dagger2:0.4.0'
annotationProcessor 'com.squareup.inject:assisted-inject-processor-dagger2:0.4.0'

// Chrome custom tabs
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'androidx.browser:browser:1.3.0'
implementation 'androidx.exifinterface:exifinterface:1.3.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package com.anshdeep.newsly

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4

import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -19,6 +17,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.example.ansh.modernnewsapp", appContext.packageName)
assertEquals("com.anshdeep.newsly", appContext.packageName)
}
}
Loading