forked from square/leakcanary
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
99 lines (84 loc) · 2.72 KB
/
build.gradle.kts
File metadata and controls
99 lines (84 loc) · 2.72 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
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
// Required to run obfuscated instrumentation tests:
// ./gradlew leakcanary-android-sample:connectedCheck -Pminify
id("com.slack.keeper")
}
keeper {
variantFilter {
setIgnore(!project.hasProperty("minify"))
}
}
dependencies {
debugImplementation(projects.leakcanary.leakcanaryAndroid)
debugImplementation(projects.leakcanary.leakcanaryAppService)
// debugImplementation(projects.leakcanary.leakcanaryAndroidStartup)
// Uncomment to use the :leakcanary process
// debugImplementation(projects.leakcanary.leakcanaryAndroidProcess)
releaseImplementation(projects.leakcanary.leakcanaryAndroidRelease)
// Optional
releaseImplementation(projects.objectWatcher.objectWatcherAndroid)
implementation(libs.kotlin.stdlib)
// Uncomment to use WorkManager
// implementation(libs.androidX.work.runtime)
testImplementation(libs.junit)
testImplementation(libs.robolectric)
androidTestImplementation(projects.leakcanary.leakcanaryAndroidInstrumentation)
androidTestImplementation(libs.androidX.test.espresso)
androidTestImplementation(libs.androidX.test.rules)
androidTestImplementation(libs.androidX.test.runner)
androidTestImplementation(libs.androidX.test.junit)
androidTestImplementation(libs.androidX.test.junitKtx)
androidTestUtil(libs.androidX.test.orchestrator)
}
android {
compileSdk = libs.versions.androidCompileSdk.get().toInt()
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId = "com.example.leakcanary"
minSdk = 16
targetSdk = libs.versions.androidCompileSdk.get().toInt()
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
// Run ./gradlew leakcanary-android-sample:connectedCheck -Porchestrator
if (project.hasProperty("orchestrator")) {
testInstrumentationRunnerArguments(mapOf("clearPackageData" to "true"))
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
}
}
buildTypes {
// Build with ./gradlew leakcanary-android-sample:installDebug -Pminify
if (project.hasProperty("minify")) {
debug {
isMinifyEnabled = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
}
} else {
debug {
}
}
release {
signingConfig = signingConfigs["debug"]
}
}
dexOptions {
dexInProcess = false
}
testOptions {
unitTests {
isIncludeAndroidResources = true
}
}
namespace = "com.example.leakcanary"
testNamespace = "com.example.leakcanary.test"
lint {
disable += "GoogleAppIndexingWarning"
}
}