Skip to content

Commit

Permalink
init push
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveentp committed Jun 1, 2019
0 parents commit e57dc7e
Show file tree
Hide file tree
Showing 75 changed files with 1,571 additions and 0 deletions.
181 changes: 181 additions & 0 deletions .gitignore
@@ -0,0 +1,181 @@
# Created by https://www.gitignore.io/api/java,android,androidstudio

### Android ###
# Built application files
*.apk
*.ap_

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# Intellij
.idea/
**/*.iml
.project
org.eclipse.buildship.core.prefs
.classpath


# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild

# Freeline
freeline.py
freeline/
freeline_project_description.json

### Android Patch ###
gen-external-apklibs

### AndroidStudio ###
# Covers files to be ignored for android development using Android Studio.

# Built application files

# Files for the ART/Dalvik VM

# Java class files

# Generated files

# Gradle files
.gradle

# Signing files
.signing/

# Local configuration file (sdk path, etc)

# Proguard folder generated by Eclipse

# Log Files

# Android Studio
/*/build/
/*/local.properties
/*/out
/*/*/build
/*/*/production
*.ipr
*~
*.swp

# Android Patch

# External native build folder generated in Android Studio 2.2 and later

# NDK
obj/

# IntelliJ IDEA
*.iws
/out/

# User-specific configurations
.idea/libraries/
.idea/.name
.idea/compiler.xml
.idea/copyright/profiles_settings.xml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml
.idea/scopes/scope_settings.xml
.idea/vcs.xml
.idea/jsLibraryMappings.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
.idea/sonarlint/

# OS-specific files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Legacy Eclipse project files
.classpath
.project

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
hs_err_pid*

## Plugin-specific files:

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Mongo Explorer plugin
.idea/mongoSettings.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### AndroidStudio Patch ###

!/gradle/wrapper/gradle-wrapper.jar

### Java ###
# Compiled class file

# Log file

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)

# Package Files #
*.jar
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml

# End of https://www.gitignore.io/api/java,android,androidstudio
1 change: 1 addition & 0 deletions README.md
@@ -0,0 +1 @@
# Clean-MVVM-NewsApp
1 change: 1 addition & 0 deletions app/.gitignore
@@ -0,0 +1 @@
/build
48 changes: 48 additions & 0 deletions app/build.gradle
@@ -0,0 +1,48 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
def globalConfiguration = rootProject.extensions.getByName("ext")
compileSdkVersion globalConfiguration["compileSdkVersion"]

defaultConfig {
applicationId "com.naveentp.newsapp"
minSdkVersion globalConfiguration["minSdkVersion"]
targetSdkVersion globalConfiguration["targetSdkVersion"]
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
def appDependencies = rootProject.ext.appDependencies

implementation project(":domain")
implementation project(":data")
implementation project(":remote")
implementation project(":cache")
implementation project(":presentation")

implementation appDependencies.kotlin
implementation appDependencies.appCompat
implementation appDependencies.ktx
implementation appDependencies.constraintLayout
implementation appDependencies.rxKotlin
implementation appDependencies.rxAndroid
implementation appDependencies.koinAndroid
implementation appDependencies.koinAndroidScope
implementation appDependencies.koinAndroidViewModel

testImplementation appDependencies.junit
androidTestImplementation appDependencies.testRunner
androidTestImplementation appDependencies.espresso
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,24 @@
package com.naveentp.newsapp

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

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.naveentp.newsapp", appContext.packageName)
}
}
22 changes: 22 additions & 0 deletions app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="com.naveentp.newsapp">

<application
android:name=".NewsApp"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

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

</manifest>
12 changes: 12 additions & 0 deletions app/src/main/java/com/naveentp/newsapp/AndroidSchedulerProvider.kt
@@ -0,0 +1,12 @@
package com.naveentp.newsapp

import com.naveentp.domain.scheduler.SchedulerProvider
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

/**
* @author Naveen T P
* @since 01/06/19
*/
class AndroidSchedulerProvider :
SchedulerProvider.Factory(Schedulers.io(), AndroidSchedulers.mainThread())
17 changes: 17 additions & 0 deletions app/src/main/java/com/naveentp/newsapp/MainActivity.kt
@@ -0,0 +1,17 @@
package com.naveentp.newsapp

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
triggerGetTopHeadlines()
}

private fun triggerGetTopHeadlines() {

}
}
27 changes: 27 additions & 0 deletions app/src/main/java/com/naveentp/newsapp/NewsApp.kt
@@ -0,0 +1,27 @@
package com.naveentp.newsapp

import android.app.Application
import com.naveentp.newsapp.di.modulesList
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.core.context.startKoin

/**
* @author Naveen T P
* @since 02/06/19
*/
class NewsApp : Application() {

override fun onCreate() {
super.onCreate()
injectKoin()
}

private fun injectKoin() {
startKoin {
androidContext(this@NewsApp)
androidLogger()
modules(modulesList)
}
}
}

0 comments on commit e57dc7e

Please sign in to comment.