-
Notifications
You must be signed in to change notification settings - Fork 611
/
build.gradle
143 lines (124 loc) · 4.93 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* Copyright 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
}
// Reads the Google maps key that is used in the AndroidManifest
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
android {
namespace "androidx.compose.samples.crane"
compileSdkVersion 34
defaultConfig {
applicationId "androidx.compose.samples.crane"
minSdkVersion 21
targetSdkVersion 33
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.compose.samples.crane.CustomTestRunner"
manifestPlaceholders = [MAPS_API_KEY: properties.getProperty("MAPS_API_KEY", "")]
}
signingConfigs {
// We use a bundled debug keystore, to allow debug builds from CI to be upgradable
debug {
storeFile rootProject.file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose true
// Disable unused AGP features
buildConfig false
aidl false
renderScript false
resValues false
shaders false
}
composeOptions {
kotlinCompilerExtensionVersion '1.5.13'
}
packagingOptions {
// Multiple dependency bring these files in. Exclude them to enable
// our test APK to build (has no effect on our AARs)
excludes += "/META-INF/AL2.0"
excludes += "/META-INF/LGPL2.1"
}
}
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.0"
implementation "com.google.android.libraries.maps:maps:3.1.0-beta"
implementation "com.google.maps.android:maps-v3-ktx:3.4.0"
constraints {
// Volley is a transitive dependency of maps
implementation("com.android.volley:volley:1.2.1") {
because("Only volley 1.2.0 or newer are available on maven.google.com")
}
}
implementation "androidx.activity:activity-compose:1.9.0"
implementation "androidx.appcompat:appcompat:1.6.1"
def composeBom = platform('androidx.compose:compose-bom:2024.05.00')
implementation(composeBom)
androidTestImplementation(composeBom)
implementation "androidx.compose.runtime:runtime"
implementation "androidx.compose.material:material"
implementation "androidx.compose.foundation:foundation"
implementation "androidx.compose.foundation:foundation-layout"
implementation "androidx.compose.animation:animation"
implementation "androidx.compose.ui:ui-tooling-preview"
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
debugImplementation "androidx.compose.ui:ui-tooling"
debugImplementation "androidx.compose.ui:ui-test-manifest"
def lifecycle_version = "2.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "com.google.dagger:hilt-android:2.51.1"
kapt "com.google.dagger:hilt-compiler:2.51.1"
implementation "io.coil-kt:coil-compose:2.6.0"
androidTestImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test:core:1.5.0"
androidTestImplementation "androidx.test:runner:1.5.2"
androidTestImplementation "androidx.test:rules:1.5.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
androidTestImplementation "androidx.test.ext:junit-ktx:1.1.5"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:1.8.0"
androidTestImplementation "com.google.dagger:hilt-android:2.51.1"
androidTestImplementation "com.google.dagger:hilt-android-testing:2.51.1"
kaptAndroidTest "com.google.dagger:hilt-compiler:2.51.1"
}