-
-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
110 lines (90 loc) · 3.21 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
110 lines (90 loc) · 3.21 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
plugins {
alias(libs.plugins.androidApplication) version BuildPluginsVersion.AGP
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.ksp)
id("io.sentry.android.gradle")
}
// useful for local debugging of the androidx.sqlite lib
// make sure to checkout the lib from
// https://github.com/androidx/androidx/tree/androidx-main/sqlite/sqlite-framework
// configurations.all {
// resolutionStrategy.dependencySubstitution {
// substitute(module("androidx.sqlite:sqlite-framework")).using(project(":sqlite-framework"))
// }
// }
android {
compileSdk = LibsVersion.SDK_VERSION
defaultConfig {
minSdk = LibsVersion.MIN_SDK_VERSION
targetSdk = LibsVersion.SDK_VERSION
versionCode = 1
versionName = "1.0"
}
buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles.add(getDefaultProguardFile("proguard-android-optimize.txt"))
signingConfig = signingConfigs.getByName("debug")
}
}
flavorDimensions += "environment"
// just a random product flavor for compatibility testing against AGP
productFlavors {
create("staging") {
dimension = "environment"
versionNameSuffix = "-staging"
}
}
signingConfigs {
getByName("debug") {
storeFile = file("debug.keystore")
storePassword = "android"
keyAlias = "androiddebugkey"
keyPassword = "android"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
namespace = "io.sentry.samples.instrumentation"
buildFeatures { compose = true }
composeOptions { kotlinCompilerExtensionVersion = "1.4.6" }
testOptions.unitTests.isIncludeAndroidResources = true
}
kotlin { jvmToolchain(11) }
// useful, when we want to modify room-generated classes, and then compile them into .class files
// so room does not re-generate and overwrite our changes
// afterEvaluate {
// tasks.getByName("kaptDebugKotlin").enabled = false
// }
dependencies {
implementation(libs.sample.androidx.recyclerView)
implementation(libs.sample.androidx.lifecycle)
implementation(libs.sample.androidx.appcompat)
implementation(libs.sample.androidx.composeRuntime)
implementation(libs.sample.androidx.composeActivity)
implementation(libs.sample.androidx.composeFoundation)
implementation(libs.sample.androidx.composeFoundationLayout)
implementation(libs.sample.androidx.composeNavigation)
implementation(libs.sample.coroutines.core)
implementation(libs.sample.coroutines.android)
implementation(libs.sample.room.runtime)
implementation(libs.sample.room.ktx)
implementation(libs.sample.timber.timber)
implementation(project(":examples:android-room-lib"))
implementation(libs.sample.fragment.fragmentKtx)
ksp(libs.sample.room.compiler)
}
sentry {
debug.set(true)
autoUploadProguardMapping.set(CI.canAutoUpload())
includeSourceContext.set(CI.canAutoUpload())
autoUploadSourceContext.set(CI.canAutoUpload())
additionalSourceDirsForSourceContext.set(setOf("src/custom/java"))
org.set("sentry-sdks")
projectName.set("sentry-android")
telemetryDsn.set(CI.SENTRY_SDKS_DSN)
tracingInstrumentation { forceInstrumentDependencies.set(true) }
}