Skip to content

Commit 7cd4355

Browse files
author
Bartosz Jarocki
committed
Initial commit.
0 parents  commit 7cd4355

File tree

71 files changed

+3025
-0
lines changed

Some content is hidden

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

71 files changed

+3025
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
.DS_Store
5+
/build
6+
.idea/
7+
*iml
8+
*.iml
9+
*/build

app/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/build
2+
*iml
3+
*.iml
4+
.idea

app/build.gradle

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'me.tatarka.retrolambda'
3+
apply plugin: 'com.neenbedankt.android-apt'
4+
apply plugin: 'android-git-sha'
5+
apply from: '../config/quality/quality.gradle'
6+
7+
def versionMajor = 0
8+
def versionMinor = 0
9+
def versionPatch = 1
10+
def versionBuild = 0
11+
12+
android {
13+
compileSdkVersion rootProject.ext.compileSdkVersion
14+
buildToolsVersion rootProject.ext.buildToolsVersion
15+
16+
compileOptions {
17+
sourceCompatibility JavaVersion.VERSION_1_8
18+
targetCompatibility JavaVersion.VERSION_1_8
19+
}
20+
21+
defaultConfig {
22+
applicationId "com.starter"
23+
minSdkVersion rootProject.ext.minSdkVersion
24+
targetSdkVersion rootProject.ext.targetSdkVersion
25+
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
26+
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
27+
28+
buildConfigField "String", "API_BASE_URL", "\"https://api.github.com\""
29+
30+
testInstrumentationRunner "${applicationId}.StarterTestRunner"
31+
vectorDrawables.useSupportLibrary = true
32+
}
33+
34+
buildTypes {
35+
release {
36+
minifyEnabled true
37+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
38+
}
39+
40+
debug {
41+
versionNameSuffix ".debug"
42+
debuggable true
43+
}
44+
}
45+
46+
packagingOptions {
47+
exclude 'META-INF/services/javax.annotation.processing.Processor'
48+
exclude 'META-INF/LICENSE.txt'
49+
exclude 'META-INF/NOTICE.txt'
50+
exclude 'META-INF/notice.txt'
51+
exclude 'META-INF/license.txt'
52+
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
53+
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
54+
}
55+
56+
dexOptions {
57+
preDexLibraries = true
58+
maxProcessCount 8
59+
javaMaxHeapSize "6g"
60+
}
61+
62+
testOptions {
63+
unitTests.returnDefaultValues = true
64+
}
65+
66+
testOptions.unitTests.all {
67+
testLogging {
68+
events 'passed', 'skipped', 'failed', 'standardOut', 'standardError'
69+
outputs.upToDateWhen { false }
70+
showStandardStreams = true
71+
}
72+
}
73+
}
74+
75+
gitSha {
76+
buildTypeMatcher = 'release' // RegExp to specify the build type
77+
flavorMatcher = 'inner|fortest' // RegExp to specify the flavor
78+
abortIfGitDirty = true // whether abort build if the current git branch is dirty
79+
}
80+
81+
dependencies {
82+
compile fileTree(dir: 'libs', include: ['*.jar'])
83+
84+
testCompile 'junit:junit:4.12'
85+
androidTestCompile 'com.android.support.test:runner:0.5'
86+
androidTestCompile 'com.android.support.test:rules:0.5'
87+
androidTestCompile "com.android.support.test.espresso:espresso-intents:$rootProject.ext.espressoVersion"
88+
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion"
89+
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2.2') {
90+
exclude group: 'com.android.support', module: 'appcompat'
91+
exclude group: 'com.android.support', module: 'support-v4'
92+
exclude module: 'recyclerview-v7'
93+
}
94+
androidTestCompile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
95+
androidTestCompile "com.android.support:design:$rootProject.ext.supportLibraryVersion"
96+
androidTestCompile "com.android.support:support-annotations:$rootProject.ext.supportLibraryVersion"
97+
androidTestCompile "org.hamcrest:hamcrest-core:$rootProject.ext.hamcrestVersion"
98+
androidTestCompile "org.hamcrest:hamcrest-integration:$rootProject.ext.hamcrestVersion"
99+
androidTestCompile "org.hamcrest:hamcrest-library:$rootProject.ext.hamcrestVersion"
100+
androidTestCompile "com.google.dexmaker:dexmaker-mockito:$rootProject.ext.dexmakerVersion"
101+
androidTestCompile "com.google.dexmaker:dexmaker:$rootProject.ext.dexmakerVersion"
102+
androidTestCompile 'org.mockito:mockito-core:1.9.5'
103+
androidTestCompile 'com.github.andrzejchm.RESTMock:android:0.1.4'
104+
androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
105+
106+
// android stuff
107+
compile "com.android.support:support-v4:$rootProject.ext.supportLibraryVersion"
108+
compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
109+
compile "com.android.support:support-annotations:$rootProject.ext.supportLibraryVersion"
110+
compile "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion"
111+
compile "com.android.support:design:$rootProject.ext.supportLibraryVersion"
112+
compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
113+
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta2'
114+
115+
compile "com.squareup.retrofit2:retrofit:$rootProject.ext.retrofitVersion"
116+
compile "com.squareup.retrofit2:converter-gson:$rootProject.ext.retrofitVersion"
117+
compile "com.squareup.retrofit2:adapter-rxjava:$rootProject.ext.retrofitVersion"
118+
compile "com.squareup.okhttp3:logging-interceptor:$rootProject.ext.okHttpVersion"
119+
compile "com.squareup.okhttp3:okhttp:$rootProject.ext.okHttpVersion"
120+
compile "com.squareup.picasso:picasso:$rootProject.ext.picassoVersion"
121+
122+
compile 'com.jakewharton.timber:timber:4.1.2'
123+
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
124+
compile "com.jakewharton:butterknife:$rootProject.ext.butterknifeVersion"
125+
apt "com.jakewharton:butterknife-compiler:$rootProject.ext.butterknifeVersion"
126+
127+
apt "com.google.dagger:dagger-compiler:$rootProject.ext.daggerVersion"
128+
compile "com.google.dagger:dagger:$rootProject.ext.daggerVersion"
129+
compile 'com.google.code.gson:gson:2.7'
130+
compile 'org.glassfish:javax.annotation:10.0-b28'
131+
132+
compile "io.reactivex:rxjava:$rootProject.ext.rxVersion"
133+
compile "io.reactivex:rxandroid:$rootProject.ext.rxVersion"
134+
135+
compile 'com.github.promeg:android-git-sha-lib:1.0.0'
136+
137+
compile 'com.facebook.stetho:stetho:1.3.0'
138+
compile 'com.facebook.stetho:stetho-okhttp3:1.3.0'
139+
}

app/proguard-rules.pro

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in <android-sdk>/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
# ButterKnife rules
20+
-keep class butterknife.** { *; }
21+
-dontwarn butterknife.internal.**
22+
-keep class **$$ViewBinder { *; }
23+
24+
-keepclasseswithmembernames class * {
25+
@butterknife.* <fields>;
26+
}
27+
28+
-keepclasseswithmembernames class * {
29+
@butterknife.* <methods>;
30+
}
31+
32+
# Retrofit rules
33+
# Platform calls Class.forName on types which do not exist on Android to determine platform.
34+
-dontnote retrofit2.Platform
35+
# Platform used when running on RoboVM on iOS. Will not be used at runtime.
36+
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
37+
# Platform used when running on Java 8 VMs. Will not be used at runtime.
38+
-dontwarn retrofit2.Platform$Java8
39+
# Retain generic type information for use by reflection by converters and adapters.
40+
-keepattributes Signature
41+
# Retain declared checked exceptions for use by a Proxy instance.
42+
-keepattributes Exceptions
43+
44+
# OkHttp rules
45+
-dontwarn okio.**
46+
-dontwarn com.squareup.okhttp.**
47+
48+
# RxJava rules
49+
# RxAndroid will soon ship with rules so this may not be needed in the future
50+
# https://github.com/ReactiveX/RxAndroid/issues/219
51+
-dontwarn sun.misc.Unsafe
52+
-keep class rx.internal.util.unsafe.** { *; }
53+
54+
# Gson rules
55+
-keepattributes Signature
56+
-keep class sun.misc.Unsafe { *; }
57+
# TODO change to match your package model
58+
# Keep non static or private fields of models so Gson can find their names
59+
-keepclassmembers class uk.co.ribot.androidboilerplate.data.model.** {
60+
!static !private <fields>;
61+
}
62+
63+
# Produces useful obfuscated stack traces
64+
# http://proguard.sourceforge.net/manual/examples.html#stacktrace
65+
-renamesourcefileattribute SourceFile
66+
-keepattributes SourceFile,LineNumberTable
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.starter">
5+
6+
<!-- Used by instrumentation tests only. Do not include in live build ! -->
7+
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
8+
<uses-permission android:name="android.permission.WAKE_LOCK"/>
9+
<uses-permission android:name="android.permission.READ_LOGS"/>
10+
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE"/>
11+
12+
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
13+
14+
</manifest>

0 commit comments

Comments
 (0)