-
Notifications
You must be signed in to change notification settings - Fork 106
/
build.gradle
119 lines (107 loc) · 3.4 KB
/
build.gradle
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
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'shot'
}
if (project.hasProperty('useKsp')) {
apply plugin: 'com.google.devtools.ksp'
kotlin {
sourceSets.configureEach {
kotlin.srcDirs += "build/generated/ksp/${it.name}/kotlin"
}
}
} else {
apply plugin: 'kotlin-kapt'
kapt {
correctErrorTypes = true
}
}
android {
namespace "com.airbnb.android.showkasesample"
defaultConfig {
applicationId "com.airbnb.android.showkasesample"
minSdkVersion 21
compileSdk 34
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion "${versions.kotlinCompilerVersion}"
kotlinCompilerExtensionVersion "${versions.composeCompiler}"
}
// Added to avoid this error -
// Execution failed for task ':app:mergeDebugAndroidTestJavaResource'.
// > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
// > 2 files found with path 'META-INF/AL2.0' from inputs:
packagingOptions {
exclude 'META-INF/AL2.0'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/gradle/incremental.annotation.processors'
}
}
if (project.hasProperty("useKsp")) {
ksp {
arg("skipPrivatePreviews", "true")
}
} else {
kapt {
arguments {
arg("skipPrivatePreviews", "true")
}
}
}
dependencies {
// Showkase dependencies
// TODO(vinaygaba): Using debugImplementation was causing kapt related NonExistentClass errors.
// Figure out a way to enable using debugImplementation
implementation project(':showkase')
implementation project(':sample-submodule')
implementation project(':sample-submodule-2')
if (project.hasProperty('useKsp')) {
ksp project(':showkase-processor')
kspAndroidTest project(':showkase-processor')
} else {
kapt project(':showkase-processor')
kaptAndroidTest project(':showkase-processor')
}
// Support Libraries
implementation deps.support.appCompat
implementation deps.support.ktx
implementation deps.support.lifecycleExtensions
// Compose
implementation deps.compose.activityCompose
implementation deps.compose.composeRuntime
implementation deps.compose.constraintLayout
implementation deps.compose.core
implementation deps.compose.foundation
implementation deps.compose.tooling
implementation deps.compose.layout
implementation deps.compose.material
implementation deps.compose.savedInstanceState
implementation deps.compose.uiLiveData
androidTestImplementation deps.compose.uiTest
// Image loading
implementation deps.imageLoading.picasso
// Testing
testImplementation deps.test.junit
androidTestImplementation deps.test.junitImplementation
androidTestImplementation project(':showkase-screenshot-testing-shot')
}