forked from dropbox/dropbox-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
90 lines (78 loc) · 2.88 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
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
alias(dropboxJavaSdkLibs.plugins.dependency.guard)
}
android {
compileSdkVersion dropboxJavaSdkLibs.versions.android.compile.sdk.get().toInteger()
buildToolsVersion "33.0.1"
defaultConfig {
applicationId "com.dropbox.core.examples.android"
minSdkVersion dropboxJavaSdkLibs.versions.android.min.sdk.get()
targetSdkVersion dropboxJavaSdkLibs.versions.android.target.sdk.get()
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
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
}
lintOptions {
disable 'InvalidPackage'
abortOnError false
}
kotlinOptions {
jvmTarget = '1.8'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
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")
}