Skip to content

Instantly share code, notes, and snippets.

@piruin
Last active October 18, 2015 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piruin/26a6a7f98e0402a4e7e1 to your computer and use it in GitHub Desktop.
Save piruin/26a6a7f98e0402a4e7e1 to your computer and use it in GitHub Desktop.
build.gradle for android clean architect
apply plugin: 'java'
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
testCompile 'junit:junit:' + rootProject.ext.junitVersion
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
allprojects {
repositories {
jcenter()
}
}
ext {
minSdkVersion = 15
targetSdkVersion = 23
compileSdkVersion = 23
buildToolsVersion = "23.0.1"
supportLibVersion = "23.0.1"
junitVersion = "4.12"
runnerVersion = "0.4.1"
rulesVersion = "0.4.1"
espressoVersion = "2.2.1"
uiautomatorVersion = "2.1.2"
}
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "th.or.nectec.android.widget.thai.sample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
debug{
testCoverageEnabled = true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile project(':domain')
compile project(':widget')
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportLibVersion
androidTestCompile 'com.android.support.test.espresso:espresso-core:' + rootProject.ext.espressoVersion
androidTestCompile 'com.android.support.test:runner:' + rootProject.ext.runnerVersion
}
include ':sample', ':domain', ':widget'
apply plugin: 'com.android.library'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
debug{
testCoverageEnabled = true
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'LICENSE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile project(':domain')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment