1
0
mirror of https://gitlab.shinice.net/pixeldroid/PixelDroid synced 2024-12-25 22:43:30 +01:00
PixelDroid-App-Android/app/build.gradle

116 lines
4.0 KiB
Groovy
Raw Normal View History

2020-02-28 00:36:26 +01:00
apply plugin: 'com.android.application'
2020-02-28 17:08:54 +01:00
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'jacoco'
2020-02-28 00:36:26 +01:00
android {
2020-03-07 18:13:26 +01:00
2020-02-28 00:36:26 +01:00
compileSdkVersion 29
2020-02-28 17:59:54 +01:00
buildToolsVersion "29.0.3"
2020-03-07 18:13:26 +01:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
2020-02-28 00:36:26 +01:00
defaultConfig {
2020-02-28 17:08:54 +01:00
applicationId "com.h.pixeldroid"
minSdkVersion 23
2020-02-28 00:36:26 +01:00
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020-03-07 18:13:26 +01:00
testInstrumentationRunnerArguments clearPackageData: 'true'
2020-02-28 00:36:26 +01:00
}
sourceSets {
main.java.srcDirs += 'src/main/java'
test.java.srcDirs += 'src/test/java'
androidTest.java.srcDirs += 'src/androidTest/java'
2020-02-28 00:36:26 +01:00
}
buildTypes {
2020-02-28 17:08:54 +01:00
debug {
testCoverageEnabled true
}
2020-02-28 00:36:26 +01:00
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
testOptions {
animationsDisabled true
2020-03-07 18:13:26 +01:00
}
2020-02-28 00:36:26 +01:00
apply plugin: 'kotlin-kapt'
2020-02-28 00:36:26 +01:00
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
2020-02-28 17:08:54 +01:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
2020-02-28 00:36:26 +01:00
implementation 'androidx.appcompat:appcompat:1.1.0'
2020-02-28 17:08:54 +01:00
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.preference:preference:1.1.0'
2020-02-28 00:36:26 +01:00
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.navigation:navigation-fragment:2.2.1'
implementation 'androidx.navigation:navigation-ui:2.2.1'
implementation "com.squareup.okhttp3:okhttp:4.4.0"
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.7.1'
implementation 'io.reactivex.rxjava2:rxjava:2.2.16'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
2020-03-06 08:37:59 +01:00
implementation "androidx.browser:browser:1.2.0"
2020-03-07 18:13:26 +01:00
implementation 'com.google.android.material:material:1.1.0'
def room_version = "2.2.4"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation("com.github.bumptech.glide:glide:4.11.0") {
2020-03-05 21:59:40 +01:00
exclude group: "com.android.support"
}
2020-03-07 19:45:27 +01:00
implementation "com.github.bumptech.glide:okhttp-integration:4.11.0"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
2020-03-07 18:13:26 +01:00
testImplementation "com.github.tomakehurst:wiremock-jre8:2.26.3"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0"
2020-02-28 17:08:54 +01:00
testImplementation 'junit:junit:4.13'
2020-03-07 18:13:26 +01:00
androidTestImplementation("com.squareup.okhttp3:mockwebserver:4.4.0")
2020-02-28 00:36:26 +01:00
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
2020-03-07 18:13:26 +01:00
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
2020-03-08 20:41:01 +01:00
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2'
2020-02-28 17:08:54 +01:00
2020-03-07 18:13:26 +01:00
}
2020-02-28 17:08:54 +01:00
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/**/*.*']
2020-02-29 14:09:20 +01:00
def kotlinDebugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"
2020-03-06 18:24:20 +01:00
getSourceDirectories().from(files([mainSrc]))
getClassDirectories().from(files([kotlinDebugTree]))
getExecutionData().from(fileTree(dir: project.buildDir, includes: [
'outputs/code_coverage/debugAndroidTest/connected/*coverage.ec',
'jacoco/testDebugUnitTest.exec'
]))
}