Skip to content

Commit f4434b4

Browse files
committed
Part 1 - Laying the app foundations
0 parents  commit f4434b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1139
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild

.idea/codeStyles/Project.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
7+
apply plugin: "kotlin-kapt"
8+
9+
apply plugin: 'androidx.navigation.safeargs'
10+
11+
android {
12+
compileSdkVersion 28
13+
defaultConfig {
14+
applicationId "com.resocoder.forecastmvvm"
15+
minSdkVersion 21
16+
targetSdkVersion 28
17+
versionCode 1
18+
versionName "1.0"
19+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
20+
}
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
25+
}
26+
}
27+
}
28+
29+
dependencies {
30+
implementation fileTree(dir: 'libs', include: ['*.jar'])
31+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
32+
implementation 'androidx.appcompat:appcompat:1.0.0'
33+
34+
// Navigation
35+
implementation "android.arch.navigation:navigation-fragment:$navigation_version"
36+
implementation "android.arch.navigation:navigation-ui:$navigation_version"
37+
implementation "android.arch.navigation:navigation-fragment-ktx:$navigation_version"
38+
implementation "android.arch.navigation:navigation-ui-ktx:$navigation_version"
39+
40+
implementation "androidx.core:core-ktx:1.0.0"
41+
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
42+
43+
// Room
44+
implementation "androidx.room:room-runtime:$room_version"
45+
implementation "androidx.legacy:legacy-support-v4:1.0.0"
46+
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
47+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
48+
kapt "androidx.room:room-compiler:$room_version"
49+
50+
// Gson
51+
implementation "com.google.code.gson:gson:2.8.5"
52+
53+
// Kotlin Android Coroutines
54+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0-RC1'
55+
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0-RC1"
56+
57+
// Retrofit
58+
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
59+
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
60+
implementation 'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'
61+
62+
// ViewModel
63+
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
64+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
65+
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
66+
67+
// Kodein
68+
implementation "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
69+
implementation "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
70+
71+
// Better dateTime-time support even on older Android versions
72+
implementation "com.jakewharton.threetenabp:threetenabp:1.1.0"
73+
74+
// Glide
75+
implementation 'com.github.bumptech.glide:glide:4.8.0'
76+
kapt 'com.github.bumptech.glide:compiler:4.8.0'
77+
78+
// Groupie RecyclerView
79+
implementation 'com.xwray:groupie:2.1.0'
80+
implementation 'com.xwray:groupie-kotlin-android-extensions:2.1.0'
81+
82+
// Preference
83+
implementation "androidx.preference:preference:1.0.0"
84+
85+
// Location
86+
implementation "com.google.android.gms:play-services-location:16.0.0"
87+
88+
// New Material Design
89+
implementation "com.google.android.material:material:1.0.0"
90+
91+
testImplementation 'junit:junit:4.12'
92+
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
93+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
94+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.resocoder.forecastmvvm
2+
3+
import androidx.test.InstrumentationRegistry
4+
import androidx.test.runner.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getTargetContext()
22+
assertEquals("com.resocoder.forecastmvvm", appContext.packageName)
23+
}
24+
}

0 commit comments

Comments
 (0)