app/build.gradle
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
apply plugin: 'com.google.gms.google-services'
jacoco {
toolVersion = "0.8.0"
}
android {
compileSdkVersion 28
buildToolsVersion '27.0.3'
defaultConfig {
android.defaultConfig.vectorDrawables.useSupportLibrary = true
applicationId "ch.epfl.sweng.radius"
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
multiDexEnabled true
}
buildTypes {
debug {
testCoverageEnabled true
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
// ...
testOptions {
unitTests.returnDefaultValues = true
}
lintOptions {
warning 'InvalidPackage'
}
// Gradle automatically adds 'android.test.runner' as a dependency.
useLibrary 'android.test.runner'
useLibrary 'android.test.base'
useLibrary 'android.test.mock'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation "com.android.support:support-compat:28.0.0"
//Picasso for downloading images from url
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:exifinterface:28.0.0'
// just here to make sure picasso doesn't cause a crash
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:preference-v14:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.firebase:firebase-storage:16.0.3' // I changed this
testImplementation 'junit:junit:4.12'
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.21buttons:fragment-test-rule:1.0.0'
// Gradle automatically adds 'android.test.runner' as a dependency.
testImplementation 'org.powermock:powermock:1.6.5'
implementation 'org.powermock:powermock:1.6.5'
testImplementation 'org.powermock:powermock-module-junit4:1.6.5'
implementation 'org.powermock:powermock-module-junit4:1.6.5'
testImplementation 'org.powermock:powermock-api-mockito:1.6.5'
androidTestImplementation 'org.powermock:powermock-api-mockito:1.6.5'
implementation 'org.powermock:powermock-api-mockito:1.6.5'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'com.google.firebase:firebase-auth:16.0.5'
androidTestImplementation 'com.google.android.gms:play-services-auth:16.0.1'
androidTestImplementation 'com.google.firebase:firebase-core:16.0.4'
androidTestImplementation 'com.google.firebase:firebase-database:16.0.3'
androidTestImplementation 'com.google.android.gms:play-services-identity:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.3'
//Google Play services
implementation 'com.google.android.gms:play-services-maps:16.0.0' //added
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-identity:16.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
// FirebaseUI for Firebase Realtime Database
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
// FirebaseUI for Cloud Firestore
implementation 'com.firebaseui:firebase-ui-firestore:4.2.0'
// FirebaseUI for Firebase Auth
implementation 'com.firebaseui:firebase-ui-auth:4.2.0'
implementation 'com.google.code.gson:gson:2.8.2'
//Circular image view
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:preference-v14:28.0.0'
//Messages
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.android.volley:volley:1.1.0'
/* TEST IMPLEMENTATION */
//androidTestImplementation 'com.android.support:appcompat-v7:28.0.0'
androidTestImplementation 'com.android.support:customtabs:28.0.0'
androidTestImplementation 'com.android.support:design:28.0.0'
androidTestImplementation 'com.android.support:support-media-compat:28.0.0'
androidTestImplementation 'com.android.support:support-v4:28.0.0'
androidTestImplementation 'com.android.support:design:28.0.0'
androidTestImplementation 'com.android.support:preference-v7:28.0.0'
androidTestImplementation 'com.android.support:preference-v14:28.0.0'
androidTestImplementation 'com.android.support.constraint:constraint-layout:1.1.3'
androidTestImplementation 'com.google.firebase:firebase-auth:16.0.5'
androidTestImplementation 'com.google.android.gms:play-services-auth:16.0.1'
androidTestImplementation 'com.google.firebase:firebase-core:16.0.4'
androidTestImplementation 'com.google.firebase:firebase-database:16.0.3'
//Google Play services
androidTestImplementation 'com.google.android.gms:play-services-maps:16.0.0' //added
androidTestImplementation 'com.google.android.gms:play-services-location:16.0.0'
androidTestImplementation 'com.google.android.gms:play-services-identity:16.0.0'
androidTestImplementation 'com.android.support:design:28.0.0'
androidTestImplementation 'com.android.support:multidex:1.0.3'
// FirebaseUI for Firebase Realtime Database
androidTestImplementation 'com.firebaseui:firebase-ui-database:4.2.0'
// FirebaseUI for Cloud Firestore
androidTestImplementation 'com.firebaseui:firebase-ui-firestore:4.2.0'
// FirebaseUI for Firebase Auth
androidTestImplementation 'com.firebaseui:firebase-ui-auth:4.2.0'
androidTestImplementation 'com.google.code.gson:gson:2.8.2'
//Circular image view
androidTestImplementation 'de.hdodenhof:circleimageview:2.2.0'
androidTestImplementation 'com.android.support:preference-v7:28.0.0'
androidTestImplementation 'com.android.support:preference-v14:28.0.0'
//Messages
androidTestImplementation 'com.firebase:firebase-client-android:2.5.2'
androidTestImplementation 'com.android.volley:volley:1.1.0'
// For recycler view testing
androidTestImplementation('com.android.support.test.espresso:espresso-contrib:2.2.1') {
// Necessary to avoid version conflicts
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
// For pressBack Test
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
reports {
xml.enabled = true
html.enabled = true
}
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*', '**/*Test*.*', 'android/**/*.*']
def debugTree = fileTree(dir: "$project.buildDir/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: project.buildDir, includes: [
'jacoco/testDebugUnitTest.exec', 'outputs/code-coverage/connected/*coverage.ec'
])
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy.force "com.android.support:support-annotations:28.0.0"
}