-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
173 lines (153 loc) · 6.68 KB
/
Copy pathbuild.gradle
File metadata and controls
173 lines (153 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
apply plugin: 'com.android.application'
apply plugin: 'jacoco'
jacoco {
toolVersion = '0.8.2'
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
// Our merge report task
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/javac/debug", excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"
sourceDirectories.from = files([mainSrc])
classDirectories.from = files([debugTree])
executionData.from = fileTree(dir: project.buildDir, includes: [
'jacoco/testDebugUnitTest.exec', 'outputs/code_coverage/debugAndroidTest/connected/**/*.ec'
])
}
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.a494studios.koreanconjugator"
minSdkVersion 19
targetSdkVersion 30
multiDexEnabled true
versionCode 31
versionName "2.1.3"
testInstrumentationRunner "com.a494studios.koreanconjugator.HanjiTestRunner"
// Comment out for coverage to work
// Source: https://medium.com/@mortenslotthansen/really-helpful-article-which-has-helped-me-a-lot-87afcc836992
testInstrumentationRunnerArguments clearPackageData: 'true'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
testCoverageEnabled true
}
}
buildTypes.each {
it.buildConfigField("String", "SERVER_URL", getApiKey("serverURL"))
it.buildConfigField("String", "SLACK_KEY", getApiKey("slackKey"))
it.buildConfigField("String", "ADMOB_KEY", getApiKey("adMobKey"))
it.resValue("string", "DISPLAY_AD_ID", getApiKey("displayAdID"))
it.resValue("string", "MAIN_AD_ID", getApiKey("mainAdID"))
it.resValue("string", "SEARCH_AD_ID", getApiKey("searchAdID"))
it.resValue("string", "SEARCH_RESULTS_AD_ID", getApiKey("searchResultsAdID"))
it.resValue("string", "CONJ_INFO_AD_ID", getApiKey("conjInfoAdID"))
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.2'
}
testOptions {
execution 'ANDROIDX_TEST_ORCHESTRATOR'
animationsDisabled true
unitTests {
includeAndroidResources = true
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
sourceSets {
androidTest {
java.srcDirs += "src/sharedTest/java"
}
test {
java.srcDirs += "src/sharedTest/java"
}
}
}
// return a MY API KEY from a properties file.
def getApiKey(String property) {
File file = new File("keys.txt")
if(file.exists()) {
Properties properties = new Properties()
properties.load(file.newInputStream())
return "\"" + properties.getProperty(property) + "\""
} else {
project.logger.log(LogLevel.ERROR, "No keys.txt file found")
return "\"NULL\""
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation "androidx.recyclerview:recyclerview:1.1.0"
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.material:material:1.2.1'
implementation 'org.jetbrains:annotations:22.0.0'
implementation 'com.github.frankiesardo:linearlistview:1.0.1@aar'
implementation 'com.codemybrainsout.onboarding:onboarder:1.0.4'
implementation 'com.github.MFlisar:changelog:1.1.7'
// Firebase
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.android.gms:play-services-ads:20.2.0'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
// Favorites parsing
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:31.1-jre'
// Settings, About, Feedback
implementation 'com.codemybrainsout.rating:ratingdialog:1.0.8'
implementation 'com.github.eggheadgames:android-about-box:2.0.1'
implementation 'com.mikepenz:aboutlibraries:8.3.1'
implementation 'org.rm3l:maoni:9.1.0@aar'
implementation 'org.rm3l:maoni-email:9.1.0@aar'
api 'org.rm3l:maoni-common:9.1.0@aar'
implementation 'com.github.pschroen:slack-api-android:c66cc8d997'
// Apollo
implementation 'com.apollographql.apollo:apollo-runtime:2.5.11'
implementation 'com.apollographql.apollo:apollo-http-cache:2.5.11'
implementation 'com.apollographql.apollo:apollo-rx2-support:2.5.11'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
// Google Play Billing
implementation 'com.android.billingclient:billing:4.0.0'
// Testing dependencies
implementation 'androidx.test.espresso:espresso-contrib:3.4.0' // Needed for idler
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:3.11.2'
testImplementation 'org.robolectric:robolectric:4.2.1' // Can't be upgraded until #5454 is fixed
testImplementation 'androidx.test:core:1.4.0'
testImplementation 'androidx.test:rules:1.4.0'
testImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
testImplementation 'androidx.test.ext:junit:1.1.3'
testImplementation 'org.robolectric:shadows-httpclient:4.6.1'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test:rules:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'com.squareup.okhttp3:mockwebserver:4.9.1'
androidTestUtil 'androidx.test:orchestrator:1.4.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.apollographql.apollo'
apply plugin: 'com.google.firebase.crashlytics'