-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathbuild.gradle
More file actions
40 lines (34 loc) · 1.32 KB
/
build.gradle
File metadata and controls
40 lines (34 loc) · 1.32 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
apply plugin: 'com.android.library'
android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? project.compileSdkVersion : 27
buildToolsVersion project.hasProperty('buildToolsVersion') ? project.buildToolsVersion : "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
}
dependencies {
implementation('com.rollbar:rollbar-android:1.7.1')
implementation 'com.facebook.react:react-android:0.71.0'
implementation 'com.google.code.gson:gson:2.9.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:3.8.0'
testImplementation 'org.mockito:mockito-inline:3.8.0'
}
afterEvaluate {
// Disable running tests automatically unless explicitly enabled
tasks.matching { it.name.startsWith("test") }.configureEach {
onlyIf { project.hasProperty("runTests") }
}
// Optionally ensure the build task itself doesn’t depend on tests
def buildTask = tasks.findByName("build")
if (buildTask != null) {
// Filter out any "test*" dependencies safely
buildTask.dependsOn = buildTask.dependsOn.findAll { dep ->
!(dep instanceof String && dep.startsWith("test")) &&
!(dep instanceof Task && dep.name.startsWith("test"))
}
}
}