-
Notifications
You must be signed in to change notification settings - Fork 463
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (86 loc) · 3.07 KB
/
Copy pathbuild.gradle
File metadata and controls
100 lines (86 loc) · 3.07 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
plugins {
id 'com.android.application'
alias(dropboxJavaSdkLibs.plugins.dependency.guard)
}
android {
namespace = "com.dropbox.core.examples.android"
compileSdk = dropboxJavaSdkLibs.versions.android.compile.sdk.get().toInteger()
buildFeatures {
buildConfig = true
}
defaultConfig {
applicationId = "com.dropbox.core.examples.android"
minSdk = dropboxJavaSdkLibs.versions.android.min.sdk.get().toInteger()
targetSdk = dropboxJavaSdkLibs.versions.android.target.sdk.get().toInteger()
versionCode = 1
versionName = "1.0"
Properties localProperties = getLocalProperties()
String dropboxKey = localProperties['DROPBOX_APP_KEY']
if (dropboxKey == null) {
logger.warn("No value provided for DROPBOX_APP_KEY. Specify a value in a examples/android/local.properties file. You can register for one at https://developers.dropbox.com/")
dropboxKey = "PUT_YOUR_APP_KEY_HERE"
}
buildConfigField "String", "DROPBOX_APP_KEY", "\"${dropboxKey}\""
manifestPlaceholders = [dropboxKey: dropboxKey]
}
buildTypes {
release {
minifyEnabled = true
shrinkResources = true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled = false
shrinkResources = false
}
}
packaging {
resources {
excludes += [
'META-INF/LICENSE',
'META-INF/LICENSE.txt',
'META-INF/NOTICE',
'META-INF/NOTICE.txt'
]
}
}
lint {
disable += 'InvalidPackage'
abortOnError = false
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
}
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
}
}
dependencies {
implementation(project(":android"))
implementation(dropboxJavaSdkLibs.android.material)
implementation(dropboxJavaSdkLibs.androidx.appcompat)
implementation(dropboxJavaSdkLibs.androidx.constraintlayout)
implementation(dropboxJavaSdkLibs.androidx.core.ktx)
implementation(dropboxJavaSdkLibs.androidx.lifecycle.runtime.ktx)
implementation(dropboxJavaSdkLibs.androidx.recyclerview)
implementation(dropboxJavaSdkLibs.glide)
implementation(dropboxJavaSdkLibs.kotlin.coroutines)
implementation(dropboxJavaSdkLibs.kotlin.stdlib)
implementation(dropboxJavaSdkLibs.okhttp3)
testImplementation(dropboxJavaSdkLibs.test.junit)
androidTestImplementation(dropboxJavaSdkLibs.androidx.test.espresso.core)
androidTestImplementation(dropboxJavaSdkLibs.androidx.test.junit)
}
def getLocalProperties() {
Properties props = new Properties()
if (file('local.properties').exists()) {
props.load(new FileInputStream(file('local.properties')))
}
return props
}
dependencyGuard {
configuration("releaseRuntimeClasspath")
}