Last active
August 23, 2017 21:50
-
-
Save alwarren/811f59341dfc26af4be982b8a678d444 to your computer and use it in GitHub Desktop.
Android API26 (O) Gradle Setup
This file contains hidden or 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
Android API26 (O) Gradle Setup | |
-------------------------------------------------------------------------------- | |
#gradle-wrapper.properties | |
distributionBase=GRADLE_USER_HOME | |
distributionPath=wrapper/dists | |
zipStoreBase=GRADLE_USER_HOME | |
zipStorePath=wrapper/dists | |
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip | |
-------------------------------------------------------------------------------- | |
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |
buildscript { | |
repositories { | |
jcenter() | |
google() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:3.0.0-beta2' | |
// NOTE: Do not place your application dependencies here; they belong | |
// in the individual module build.gradle files | |
} | |
} | |
allprojects { | |
repositories { | |
jcenter() | |
google() | |
} | |
} | |
task clean(type: Delete) { | |
delete rootProject.buildDir | |
} | |
-------------------------------------------------------------------------------- | |
// App Level build.gradle | |
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion 26 | |
buildToolsVersion '26.0.1' | |
defaultConfig { | |
applicationId "your.package.name" | |
minSdkVersion 19 | |
targetSdkVersion 26 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
} | |
dependencies { | |
// support | |
implementation 'com.android.support:appcompat-v7:26.0.1' | |
implementation 'com.android.support:support-annotations:26.0.1' | |
// integration tests | |
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { | |
exclude group: 'com.android.support', module: 'support-annotations' | |
}) | |
androidTestImplementation 'org.mockito:mockito-android:2.8.47' | |
// unit tests | |
testImplementation fileTree(include: ['*.jar'], dir: 'libs') | |
testImplementation 'junit:junit:4.12' | |
testImplementation 'org.mockito:mockito-core:2.8.47' | |
testImplementation 'com.android.support.test:runner:1.0.0' | |
testImplementation 'com.android.support.test:rules:1.0.0' | |
testImplementation 'org.mockito:mockito-core:2.8.47' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment