|
| 1 | +//noinspection LifecycleAnnotationProcessorWithJava8 |
| 2 | +apply plugin: 'com.android.application' |
| 3 | +apply plugin: 'kotlin-android' |
| 4 | +apply plugin: 'kotlin-kapt' |
| 5 | +apply plugin: 'kotlin-android-extensions' |
| 6 | + |
| 7 | +// https://www.androidhuman.com/lecture/quality/2016/02/13/jacoco_unit_test_android/ |
| 8 | +// https://jojoldu.tistory.com/275 |
| 9 | +// https://medium.com/@android2ee/playing-with-gradle-3-and-some-few-code-coverage-on-android-with-jacoco-47df7c9328ae |
| 10 | +apply plugin: 'com.github.kt3k.coveralls' |
| 11 | +apply plugin: 'jacoco-android' |
| 12 | +// https://blog.yena.io/studynote/2018/09/08/Android-Kotlin-Room.html |
| 13 | +// https://kotlinlang.org/docs/reference/using-gradle.html |
| 14 | + |
| 15 | +android { |
| 16 | + compileSdkVersion 28 |
| 17 | + defaultConfig { |
| 18 | + applicationId "com.seok.gfd" |
| 19 | + minSdkVersion 26 |
| 20 | + targetSdkVersion 28 |
| 21 | + versionCode 10 |
| 22 | + versionName "3.20.12" |
| 23 | + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" |
| 24 | + } |
| 25 | + buildTypes { |
| 26 | + release { |
| 27 | + minifyEnabled false |
| 28 | + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
| 29 | + testCoverageEnabled false |
| 30 | + buildConfigField "String", "GITHUB_OAUTH_URL", GITHUB_OAUTH_URL |
| 31 | + buildConfigField "String", "GITHUB_CLIENT_ID", GITHUB_CLIENT_ID |
| 32 | + buildConfigField "String", "GITHUB_CLIENT_SECRET", GITHUB_CLIENT_SECRET |
| 33 | + buildConfigField "String", "REDIRECT_CALLBACK_URL", REDIRECT_CALLBACK_URL |
| 34 | + buildConfigField "String", "PREFERENCES_FILE", PREFERENCES_FILE |
| 35 | + buildConfigField "String", "PREFERENCES_TOKEN_KEY", PREFERENCES_TOKEN_KEY |
| 36 | + buildConfigField "String", "BASIC_AUTH_KEY", BASIC_AUTH_KEY |
| 37 | + buildConfigField "String", "GFD_API_URL", GFD_API_URL |
| 38 | + } |
| 39 | + debug { |
| 40 | + testCoverageEnabled true |
| 41 | + buildConfigField "String", "GITHUB_OAUTH_URL", GITHUB_OAUTH_URL |
| 42 | + buildConfigField "String", "GITHUB_CLIENT_ID", GITHUB_CLIENT_ID |
| 43 | + buildConfigField "String", "GITHUB_CLIENT_SECRET", GITHUB_CLIENT_SECRET |
| 44 | + buildConfigField "String", "REDIRECT_CALLBACK_URL", REDIRECT_CALLBACK_URL |
| 45 | + buildConfigField "String", "PREFERENCES_FILE", PREFERENCES_FILE |
| 46 | + buildConfigField "String", "PREFERENCES_TOKEN_KEY", PREFERENCES_TOKEN_KEY |
| 47 | + buildConfigField "String", "BASIC_AUTH_KEY", BASIC_AUTH_KEY |
| 48 | + buildConfigField "String", "GFD_API_URL", GFD_API_URL |
| 49 | + } |
| 50 | + } |
| 51 | + compileOptions { |
| 52 | + sourceCompatibility = '1.8' |
| 53 | + targetCompatibility = '1.8' |
| 54 | + } |
| 55 | + testOptions { |
| 56 | + unitTests { |
| 57 | + includeAndroidResources = true |
| 58 | + returnDefaultValues = true |
| 59 | + } |
| 60 | + } |
| 61 | + lintOptions { |
| 62 | + abortOnError false |
| 63 | + } |
| 64 | +} |
| 65 | + |
| 66 | +coveralls { |
| 67 | + jacocoReportPath 'build/reports/jacoco/jacocoTestDebugUnitTestReport/jacocoTestDebugUnitTestReport.xml' |
| 68 | +} |
| 69 | +jacocoAndroidUnitTestReport { |
| 70 | + excludes += ['**/views/**'] |
| 71 | +} |
| 72 | + |
| 73 | +dependencies { |
| 74 | + implementation fileTree(dir: 'libs', include: ['*.jar']) |
| 75 | + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" |
| 76 | + implementation 'androidx.appcompat:appcompat:1.1.0' |
| 77 | + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' |
| 78 | + implementation 'com.android.support:design:28.0.0' |
| 79 | + implementation "androidx.recyclerview:recyclerview:1.0.0" |
| 80 | + |
| 81 | + // test implementation |
| 82 | + implementation 'androidx.legacy:legacy-support-v4:1.0.0' |
| 83 | + testImplementation 'junit:junit:4.12' |
| 84 | + testImplementation 'org.robolectric:robolectric:4.3' |
| 85 | + testImplementation 'org.powermock:powermock-api-mockito:1.4.12' |
| 86 | + testImplementation 'org.powermock:powermock-module-junit4:1.6.2' |
| 87 | + testImplementation 'org.mockito:mockito-core:2.28.2' |
| 88 | + testImplementation 'androidx.arch.core:core-testing:2.1.0' |
| 89 | + androidTestImplementation 'androidx.test:runner:1.2.0' |
| 90 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 91 | + androidTestImplementation 'androidx.test:runner:1.2.0' |
| 92 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 93 | + androidTestImplementation 'androidx.test:runner:1.2.0' |
| 94 | + androidTestImplementation 'androidx.test:rules:1.2.0' |
| 95 | + androidTestImplementation 'androidx.test:core:1.2.0' |
| 96 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 97 | + androidTestImplementation 'androidx.test.ext:junit:1.1.1' |
| 98 | + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' |
| 99 | + androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0' |
| 100 | + |
| 101 | + // Google Ads |
| 102 | + implementation 'com.google.android.gms:play-services-ads:18.2.0' |
| 103 | + |
| 104 | + // OkHttp && logger |
| 105 | + implementation 'com.squareup.okhttp3:okhttp:3.12.0' |
| 106 | + implementation 'com.squareup.okhttp3:logging-interceptor:3.4.2' |
| 107 | + |
| 108 | + // Retrofit2 |
| 109 | + implementation 'com.squareup.retrofit2:retrofit:2.6.1' |
| 110 | + implementation 'com.squareup.retrofit2:converter-gson:2.4.0' |
| 111 | + implementation 'com.google.code.gson:gson:2.8.5' |
| 112 | + |
| 113 | + // room |
| 114 | + implementation 'androidx.room:room-runtime:2.2.0' |
| 115 | + kapt 'androidx.room:room-compiler:2.2.0' |
| 116 | + kaptTest 'androidx.room:room-testing:2.2.0' |
| 117 | + |
| 118 | + // Lifecycle components |
| 119 | + implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0' |
| 120 | + implementation 'android.arch.lifecycle:viewmodel:1.1.1' |
| 121 | + annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.1.0' |
| 122 | + |
| 123 | + // Coroutines |
| 124 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutine_version" |
| 125 | + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutine_version" |
| 126 | + |
| 127 | + // Using the Glide Library for Image loading |
| 128 | + implementation 'com.github.bumptech.glide:glide:4.9.0' |
| 129 | + kapt 'com.github.bumptech.glide:compiler:4.9.0' |
| 130 | + |
| 131 | + // jsoup, anko |
| 132 | + implementation 'org.jsoup:jsoup:1.11.3' |
| 133 | + implementation "org.jetbrains.anko:anko:$rootProject.anko_version" |
| 134 | + implementation 'androidx.gridlayout:gridlayout:1.0.0' |
| 135 | + |
| 136 | + // lombok |
| 137 | + compileOnly 'org.projectlombok:lombok:1.18.8' |
| 138 | + annotationProcessor 'org.projectlombok:lombok:1.18.8' |
| 139 | + |
| 140 | + // ProgressBar |
| 141 | + implementation 'com.wang.avi:library:2.1.3' |
| 142 | + |
| 143 | + // NavigationBar |
| 144 | + implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0' |
| 145 | + implementation 'androidx.navigation:navigation-ui-ktx:2.1.0' |
| 146 | + |
| 147 | + // UI Scale |
| 148 | + implementation 'com.ssomai:android.scalablelayout:2.1.6' |
| 149 | + |
| 150 | + // Tab Layout |
| 151 | + implementation 'com.ogaclejapan.smarttablayout:library:2.0.0@aar' |
| 152 | + implementation 'com.ogaclejapan.smarttablayout:utils-v4:2.0.0@aar' |
| 153 | +} |
0 commit comments