Last active
November 27, 2017 16:38
-
-
Save jobinlawrance/49f3309f9114209c3fa8432cab49143a to your computer and use it in GitHub Desktop.
Android Quick startup essentials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Built application files | |
*.apk | |
!test-butler-app-1.3.1.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 | |
*.iml | |
.idea/* | |
# Keystore files | |
*.jks | |
# External native build folder generated in Android Studio 2.2 and later | |
.externalNativeBuild | |
projectFilesBackup*/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
//... All the other required ones | |
//view bindings | |
compile 'com.jakewharton:butterknife:8.8.1' | |
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' | |
//Rx | |
compile "io.reactivex.rxjava2:rxjava:2.1.6" | |
compile 'io.reactivex.rxjava2:rxandroid:2.0.1' | |
//Retrofit | |
compile 'com.squareup.retrofit2:retrofit:2.3.0' | |
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' | |
compile 'com.squareup.retrofit2:converter-gson:2.3.0' | |
//glide | |
compile 'com.github.bumptech.glide:glide:4.3.1' | |
annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1' | |
//Debugging tools | |
compile 'com.facebook.stetho:stetho:1.5.0' | |
compile 'com.facebook.stetho:stetho-okhttp3:1.5.0' | |
debugCompile 'com.amitshekhar.android:debug-db:1.0.1' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To create generated API | |
@GlideModule | |
public final class MyAppGlideModule extends AppGlideModule { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyApplication extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
Stetho.initializeWithDefaults(this); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetworkSetup { | |
public void setup() { | |
//Adding Stetho Interceptor | |
OkHttpClient okHttpClient = | |
new OkHttpClient | |
.Builder() | |
.addNetworkInterceptor(new StethoInterceptor()) | |
.build(); | |
Retrofit retrofit = | |
new Retrofit.Builder() | |
.client(okHttpClient) | |
.baseUrl(baseUrl) | |
.addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(Schedulers.io())) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.build(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
repositories { | |
jcenter() | |
//The support libraries are now available through Google's Maven repository. | |
maven { | |
url "https://maven.google.com" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment