Skip to content
This repository was archived by the owner on Sep 29, 2020. It is now read-only.

Commit b2cf997

Browse files
committed
first commit
1 parent cd60475 commit b2cf997

File tree

110 files changed

+2803
-18
lines changed

Some content is hidden

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

110 files changed

+2803
-18
lines changed

.gitignore

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_store
12
# Built application files
23
*.apk
34
*.ap_
@@ -20,9 +21,6 @@ build/
2021
# Local configuration file (sdk path, etc)
2122
local.properties
2223

23-
# Proguard folder generated by Eclipse
24-
proguard/
25-
2624
# Log Files
2725
*.log
2826

@@ -34,22 +32,12 @@ captures/
3432

3533
# Intellij
3634
*.iml
37-
.idea/workspace.xml
38-
.idea/tasks.xml
39-
.idea/gradle.xml
40-
.idea/dictionaries
41-
.idea/libraries
42-
43-
# Keystore files
44-
*.jks
35+
.idea/
36+
projectFilesBackup/
4537

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

49-
# Google Services (e.g. APIs or Firebase)
50-
google-services.json
51-
52-
# Freeline
53-
freeline.py
54-
freeline/
55-
freeline_project_description.json
41+
# Fastlane
42+
fastlane/README.md
43+
fastlane/report.xml

Dangerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Sometimes it's a README fix, or something like that - which isn't relevant for
2+
# including in a project's CHANGELOG for example
3+
declared_trivial = github.pr_title.include? "#trivial"
4+
5+
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet
6+
warn("Work in Progress") if github.pr_title.include? "WIP"
7+
8+
# Warn when there is a big PR
9+
warn("Big PR > 1000") if git.lines_of_code > 1000
10+
11+
# Reviewers
12+
has_assignee = github.pr_json["assignee"] != nil
13+
warn("No Assign", sticky: false) unless has_assignee
14+
15+
# Testing
16+
# @TODO I'll think this later.
17+
# is_source_changed = !git.modified_files.grep(/^main\/kotlin/).empty?
18+
# is_test_changed = !git.modified_files.grep(/^test\/kotlin/).empty?
19+
#if is_source_changed && !is_test_changed
20+
# warn('Must update to tests')
21+
#end
22+
23+
# Android Lint
24+
android_lint.gradle_task = "app:lintDevelopRelease"
25+
android_lint.report_file = "app/build/reports/lint-results-developRelease.xml"
26+
android_lint.filtering = true
27+
android_lint.lint(inline_mode: true)
28+
29+
# Findbugs
30+
findbugs.gradle_module = "app"
31+
findbugs.gradle_task = "app:findbugs"
32+
findbugs.report_file = "app/build/reports/findbugs/findbugs.xml"
33+
findbugs.report
34+
35+
# checkstyle
36+
github.dismiss_out_of_range_messages
37+
checkstyle_format.base_path = Dir.pwd
38+
checkstyle_format.report "app/build/reports/ktlint/ktlint-checkstyle-report.xml"

Gemfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# frozen_string_literal: true
2+
source "https://rubygems.org"
3+
4+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
5+
6+
# gem "rails"
7+
gem "danger"
8+
gem "danger-android_lint"
9+
gem "danger-findbugs"
10+
gem "danger-checkstyle_format"

Gemfile.lock

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.5.2)
5+
public_suffix (>= 2.0.2, < 4.0)
6+
ansi (1.5.0)
7+
ast (2.3.0)
8+
claide (1.0.2)
9+
claide-plugins (0.9.2)
10+
cork
11+
nap
12+
open4 (~> 1.3)
13+
colored2 (3.1.2)
14+
cork (0.3.0)
15+
colored2 (~> 3.1)
16+
danger (5.5.5)
17+
claide (~> 1.0)
18+
claide-plugins (>= 0.9.2)
19+
colored2 (~> 3.1)
20+
cork (~> 0.1)
21+
faraday (~> 0.9)
22+
faraday-http-cache (~> 1.0)
23+
git (~> 1)
24+
kramdown (~> 1.5)
25+
no_proxy_fix
26+
octokit (~> 4.7)
27+
terminal-table (~> 1)
28+
danger-android_lint (0.0.5)
29+
danger-plugin-api (~> 1.0)
30+
oga
31+
danger-checkstyle_format (0.1.0)
32+
danger-plugin-api (~> 1.0)
33+
ox (~> 2.0)
34+
danger-findbugs (0.0.5)
35+
danger-plugin-api (~> 1.0)
36+
oga (~> 2.10)
37+
danger-plugin-api (1.0.0)
38+
danger (> 2.0)
39+
faraday (0.13.1)
40+
multipart-post (>= 1.2, < 3)
41+
faraday-http-cache (1.3.1)
42+
faraday (~> 0.8)
43+
git (1.3.0)
44+
kramdown (1.16.2)
45+
multipart-post (2.0.0)
46+
nap (1.1.0)
47+
no_proxy_fix (0.1.2)
48+
octokit (4.7.0)
49+
sawyer (~> 0.8.0, >= 0.5.3)
50+
oga (2.11)
51+
ast
52+
ruby-ll (~> 2.1)
53+
open4 (1.3.4)
54+
ox (2.8.2)
55+
public_suffix (3.0.1)
56+
ruby-ll (2.1.2)
57+
ansi
58+
ast
59+
sawyer (0.8.1)
60+
addressable (>= 2.3.5, < 2.6)
61+
faraday (~> 0.8, < 1.0)
62+
terminal-table (1.8.0)
63+
unicode-display_width (~> 1.1, >= 1.1.1)
64+
unicode-display_width (1.3.0)
65+
66+
PLATFORMS
67+
ruby
68+
69+
DEPENDENCIES
70+
danger
71+
danger-android_lint
72+
danger-checkstyle_format
73+
danger-findbugs
74+
75+
BUNDLED WITH
76+
1.16.0

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Android
2+
3+
## Getting Started
4+
5+
### Major libraries
6+
7+
- Kotlin
8+
- Android Architecture Components (ViewModel, LiveData, Room)
9+
- Dagger2
10+
- Retrofit
11+
- RxJava
12+
- Moshi and Kotshi
13+
- Glide
14+
15+
### Naming rules
16+
17+
#### XMLs
18+
http://standards.mediarain.com/android/java
19+
20+
<a href="https://jeroenmols.com/blog/2016/03/07/resourcenaming/">
21+
<img src="https://jeroenmols.com/img/blog/resourcenaming/resourcenaming_cheatsheet.png" width="65%">
22+
</a>
23+
24+
#### Colors
25+
26+
Examples..
27+
```xml
28+
<color name="white">#FFFFFF</color>
29+
<color name="white_20">#33FFFFFF</color>
30+
<color name="black_50">#80000000</color>
31+
<color name="matterhorn">#555555</color>
32+
<color name="neon_blue">#6447FF</color>
33+
```
34+
http://www.htmlcsscolor.com/
35+
36+
## Update gem's versions for Danger
37+
38+
```
39+
$ brew update
40+
$ brew install rbenv ruby-build
41+
$ rbenv install -l
42+
$ rbenv install {targetVerion}
43+
$ rbenv global {targetVersion}
44+
$ rbenv exec gem install bundler
45+
$ rbenv exec bundle update
46+
```
47+

app/build.gradle

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'com.google.protobuf'
3+
apply plugin: 'kotlin-android'
4+
apply plugin: 'kotlin-android-extensions'
5+
apply plugin: 'kotlin-kapt'
6+
apply from: '../gradle/ktlint.gradle'
7+
apply from: '../gradle/findbugs.gradle'
8+
apply from: '../gradle/jacoco.gradle'
9+
10+
android {
11+
compileSdkVersion COMPILE_SDK_VERSION as int
12+
buildToolsVersion BUILD_TOOLS_VERSION
13+
14+
defaultConfig {
15+
applicationId PACKAGE_NAME
16+
minSdkVersion MIN_SDK_VERSION as int
17+
targetSdkVersion TARGET_SDK_VERSION as int
18+
versionCode VERSION_CODE as int
19+
versionName VERSION_NAME
20+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
21+
multiDexEnabled true
22+
}
23+
24+
// SigningConfigs
25+
apply from: '../keystore/debug.gradle', to: android
26+
27+
buildTypes {
28+
debug {
29+
debuggable true
30+
zipAlignEnabled true
31+
testCoverageEnabled false
32+
applicationIdSuffix ".debug"
33+
signingConfig signingConfigs.debug
34+
ext.enableCrashlytics = false
35+
ext.alwaysUpdateBuildId = false
36+
}
37+
release {
38+
debuggable false
39+
zipAlignEnabled true
40+
minifyEnabled true
41+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
42+
shrinkResources true
43+
// FIXME
44+
signingConfig signingConfigs.debug
45+
ext.betaDistributionGroupAliases = "developers"
46+
ext.betaDistributionReleaseNotes = "git log --oneline".execute().text.split('\n')[0]
47+
}
48+
}
49+
50+
// Variable environment for productFlavors
51+
apply from: 'flavors.gradle'
52+
53+
dataBinding {
54+
enabled = true
55+
}
56+
57+
compileOptions {
58+
sourceCompatibility JavaVersion.VERSION_1_8
59+
targetCompatibility JavaVersion.VERSION_1_8
60+
}
61+
62+
sourceSets {
63+
main.java.srcDirs += 'src/main/kotlin'
64+
test.java.srcDirs += ['src/test/kotlin', 'src/debug/kotlin']
65+
}
66+
67+
lintOptions {
68+
lintConfig file('../gradle/android-lint-config.xml')
69+
}
70+
}
71+
72+
dependencies {
73+
// Multidex
74+
implementation 'com.android.support:multidex:1.0.3'
75+
implementation 'com.android.support:multidex-instrumentation:1.0.3'
76+
77+
// Google
78+
implementation "com.android.support:support-compat:$SUPPORT_PACKAGE_VERSION"
79+
implementation "com.android.support:support-core-utils:$SUPPORT_PACKAGE_VERSION"
80+
implementation "com.android.support:support-core-ui:$SUPPORT_PACKAGE_VERSION"
81+
implementation "com.android.support:support-fragment:$SUPPORT_PACKAGE_VERSION"
82+
implementation "com.android.support:appcompat-v7:$SUPPORT_PACKAGE_VERSION"
83+
implementation "com.android.support:design:$SUPPORT_PACKAGE_VERSION"
84+
implementation "com.android.support:customtabs:$SUPPORT_PACKAGE_VERSION"
85+
implementation "com.android.support:cardview-v7:$SUPPORT_PACKAGE_VERSION"
86+
implementation "com.android.support:recyclerview-v7:$SUPPORT_PACKAGE_VERSION"
87+
implementation "com.android.support:support-annotations:$SUPPORT_PACKAGE_VERSION"
88+
implementation "com.google.android.gms:play-services-base:$GOOGLE_SERVICE_VERSION"
89+
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
90+
implementation 'androidx.core:core-ktx:0.2'
91+
implementation 'android.arch.lifecycle:extensions:1.1.0'
92+
kapt 'android.arch.lifecycle:compiler:1.1.0'
93+
implementation 'android.arch.persistence.room:runtime:1.1.0-alpha3'
94+
kapt 'android.arch.persistence.room:compiler:1.1.0-alpha3'
95+
implementation 'android.arch.paging:runtime:1.0.0-alpha6'
96+
implementation 'android.arch.persistence.room:rxjava2:1.0.0'
97+
implementation 'android.arch.lifecycle:reactivestreams:1.1.0'
98+
// FRP
99+
implementation 'io.reactivex.rxjava2:rxjava:2.1.10'
100+
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
101+
implementation 'io.reactivex.rxjava2:rxkotlin:2.2.0'
102+
103+
// OkHttp, Retrofit
104+
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
105+
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
106+
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
107+
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
108+
// Moshi
109+
implementation 'com.squareup.moshi:moshi:1.5.0'
110+
implementation 'com.squareup.moshi:moshi-kotlin:1.5.0'
111+
implementation 'com.squareup.retrofit2:converter-moshi:2.3.0'
112+
implementation 'se.ansman.kotshi:api:1.0.2'
113+
kapt 'se.ansman.kotshi:compiler:1.0.2'
114+
// Timber
115+
implementation 'com.jakewharton.timber:timber:4.6.1'
116+
117+
// Kotlin
118+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre8:$KOTLIN_VERSION"
119+
120+
// Dagger2
121+
implementation "com.google.dagger:dagger:$DAGGER_VERSION"
122+
implementation "com.google.dagger:dagger-android:$DAGGER_VERSION"
123+
implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
124+
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
125+
kapt "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
126+
127+
// Glide
128+
implementation 'com.github.bumptech.glide:glide:4.6.1'
129+
kapt 'com.github.bumptech.glide:compiler:4.6.1'
130+
implementation 'com.github.bumptech.glide:okhttp3-integration:4.6.1'
131+
implementation 'jp.wasabeef:glide-transformations:3.1.1'
132+
133+
// ReactiveLiveData
134+
implementation 'com.github.musichin.reactivelivedata:reactivelivedata:0.13.0'
135+
}
136+
137+
// For Debugging
138+
dependencies {
139+
debugImplementation "com.facebook.stetho:stetho:$STETHO_VERSION"
140+
debugImplementation "com.facebook.stetho:stetho-okhttp3:$STETHO_VERSION"
141+
debugImplementation "com.facebook.stetho:stetho-timber:$STETHO_VERSION"
142+
}
143+
144+
// For Testing
145+
dependencies {
146+
testImplementation "junit:junit:$JUNIT_VERSION"
147+
testImplementation 'org.robolectric:robolectric:3.7.1'
148+
testImplementation 'org.mockito:mockito-core:2.15.0'
149+
testImplementation 'org.mockito:mockito-inline:2.15.0'
150+
testImplementation 'com.squareup.okhttp3:mockwebserver:3.10.0'
151+
152+
testImplementation "com.facebook.stetho:stetho:$STETHO_VERSION"
153+
testImplementation "com.facebook.stetho:stetho-okhttp3:$STETHO_VERSION"
154+
testImplementation "com.facebook.stetho:stetho-timber:$STETHO_VERSION"
155+
}

0 commit comments

Comments
 (0)