Skip to content

Instantly share code, notes, and snippets.

@jsaund
Last active July 14, 2017 04:21
Show Gist options
  • Save jsaund/93507ac9da1fd00906129b9f694ae311 to your computer and use it in GitHub Desktop.
Save jsaund/93507ac9da1fd00906129b9f694ae311 to your computer and use it in GitHub Desktop.
Typical Empty Android Project Template
# Compiled source #
###################
*.class
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.rar
*.tar
*.zip
*.jar
*.war
*.ear
# Logs and databases #
######################
*.log
# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
# Editor Files #
################
*~
*.swp
# Gradle Files #
################
.gradle
.gradletasknamecache
.m2
# Gradle Signing #
##################
signing.properties
rxuploader.keystore
# Maven #
#########
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
# Build output directies
target/
build/
# IntelliJ specific files/directories
out
.idea
*.ipr
*.iws
*.iml
atlassian-ide-plugin.xml
# AndroidStudio specific files/directories
local.properties
# Eclipse specific files/directories
.classpath
.project
.settings
.metadata
bin/
# NetBeans specific files/directories
.nbattrs
/.nb-gradle/profiles/private/
.nb-gradle-properties
# Android
local.properties
# jEnv
.java-version
# app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
dependencies {
// AppCompatActivity, AppCompatDialog, ActionBar, etc
compile rootProject.deps.androidSupportLibrary
// Nullability annotations
compile rootProject.deps.androidAnnotations
// RecyclerView
compile rootProject.deps.androidRecyclerView
// Networking (HTTP Client)
compile rootProject.deps.okHttp
compile rootProject.deps.okHttpLogging
// Networking DSL
compile rootProject.deps.retrofit
compile rootProject.deps.retrofitGsonConverter
compile rootProject.deps.retrofitRxJavaAdapter
// RxJava
compile rootProject.deps.rxJava
compile rootProject.deps.rxAndroid
compile rootProject.deps.rxLifecycle
// Model serialization
compile rootProject.deps.gson
provided rootProject.deps.autovalue
provided rootProject.deps.autovalueGson
// Image loading and caching
compile rootProject.deps.glide
compile rootProject.deps.glideOkHttp
// Logging
compile rootProject.deps.timber
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
testCompile 'junit:junit:4.12'
}
android {
compileSdkVersion rootProject.COMPILE_SDK_VERSION
buildToolsVersion rootProject.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
applicationId "com.mizuseichi.yamazaki"
minSdkVersion rootProject.MIN_SDK_VERSION
targetSdkVersion rootProject.TARGET_SDK_VERSION
versionCode rootProject.ext.versionCode
versionName rootProject.ext.versionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility rootProject.JAVA_SOURCE_VERSION
targetCompatibility rootProject.JAVA_TARGET_VERSION
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.6.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
subprojects { projects ->
apply from: "$rootDir/dependencies.gradle"
}
ext {
versionName = '0.0.1'
versionCode = 1
}
task clean(type: Delete) {
delete rootProject.buildDir
}
rootProject.ext.JAVA_SOURCE_VERSION = JavaVersion.VERSION_1_8
rootProject.ext.JAVA_TARGET_VERSION = JavaVersion.VERSION_1_8
rootProject.ext.TARGET_SDK_VERSION = 26
rootProject.ext.COMPILE_SDK_VERSION = 26
rootProject.ext.MIN_SDK_VERSION = 15
rootProject.ext.ANDROID_BUILD_TOOLS_VERSION = "26.0.0"
rootProject.ext.ANDROID_SUPPORT_LIBS_VERSION = "26.0.0-alpha1"
rootProject.ext.OKHTTP_VERSION = "3.8.0"
rootProject.ext.RX_JAVA_VERSION = "1.3.0"
rootProject.ext.RX_ANDROID_VERSION = "1.2.1"
rootProject.ext.RX_LIFECYCLE_VERSION = "1.0"
rootProject.ext.AUTOVALUE_VERSION = "1.4.1"
rootProject.ext.AUTOVALUE_GSON_VERSION = "0.4.6"
rootProject.ext.GSON_VERSION = "2.8.0"
rootProject.ext.RETROFIT_VERSION = "2.3.0"
rootProject.ext.TIMBER_VERSION = "4.5.1"
rootProject.ext.GLIDE_VERSION = "3.8.0"
rootProject.ext.deps =
[androidSupportLibrary: "com.android.support:appcompat-v7:$ANDROID_SUPPORT_LIBS_VERSION",
androidAnnotations : "com.android.support:support-annotations:$ANDROID_SUPPORT_LIBS_VERSION",
androidRecyclerView : "com.android.support:recyclerview-v7:$ANDROID_SUPPORT_LIBS_VERSION",
okHttp : "com.squareup.okhttp3:okhttp:$OKHTTP_VERSION",
okHttpLogging : "com.squareup.okhttp3:logging-interceptor:$OKHTTP_VERSION",
retrofit : "com.squareup.retrofit2:retrofit:$RETROFIT_VERSION",
retrofitGsonConverter: "com.squareup.retrofit2:converter-gson:$RETROFIT_VERSION",
retrofitRxJavaAdapter: "com.squareup.retrofit2:adapter-rxjava:$RETROFIT_VERSION",
timber : "com.jakewharton.timber:timber:$TIMBER_VERSION",
rxJava : "io.reactivex:rxjava:$RX_JAVA_VERSION",
rxAndroid : "io.reactivex:rxandroid:$RX_ANDROID_VERSION",
rxLifecycle : "com.trello:rxlifecycle-components:$RX_LIFECYCLE_VERSION",
autovalue : "com.google.auto.value:auto-value:$AUTOVALUE_VERSION",
autovalueGson : "com.ryanharter.auto.value:auto-value-gson:$AUTOVALUE_GSON_VERSION",
gson : "com.google.code.gson:gson:$GSON_VERSION",
glide : "com.github.bumptech.glide:glide:$GLIDE_VERSION",
glideOkHttp : "com.github.bumptech.glide:okhttp3-integration:1.5.0@aar"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment