Skip to content

Commit 10d35db

Browse files
authored
Upgraded one of the Android Samples to the latest versions of dependencies. (#391)
1 parent 66c8bc9 commit 10d35db

File tree

5 files changed

+36
-12
lines changed

5 files changed

+36
-12
lines changed

examples/DropboxAndroid/app/build.gradle

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,30 @@ plugins {
44
}
55

66
android {
7-
compileSdkVersion 30
7+
compileSdkVersion 32
88
buildToolsVersion "30.0.3"
99

1010
defaultConfig {
1111
applicationId "com.dropbox.dropboxexample"
1212
minSdkVersion 23
13-
targetSdkVersion 29 //https://github.com/dropbox/dropbox-sdk-java/issues/321
13+
targetSdkVersion 32
1414
versionCode 1
1515
versionName "1.0"
1616

1717
Properties localProperties = getLocalProperties()
1818
String dropboxKey = localProperties['DROPBOX_KEY']
19+
if (dropboxKey == null) {
20+
throw new RuntimeException("No value provided for DROPBOX_KEY (Dropbox API Key). Specify a value in the local.properties file.")
21+
}
1922
buildConfigField "String", "DROPBOX_KEY", "\"${dropboxKey}\""
2023
manifestPlaceholders = [dropboxKey: dropboxKey]
2124
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2225
}
2326

2427
buildTypes {
28+
debug {
29+
minifyEnabled false
30+
}
2531
release {
2632
minifyEnabled false
2733
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
@@ -44,12 +50,12 @@ dependencies {
4450
implementation group: 'com.dropbox.core', name: 'dropbox-core-sdk', version: '+', changing: true
4551

4652
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
47-
implementation 'androidx.core:core-ktx:1.6.0'
48-
implementation 'androidx.appcompat:appcompat:1.3.0'
49-
implementation 'com.google.android.material:material:1.4.0'
50-
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
51-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
52-
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.0-alpha02"
53+
implementation 'androidx.core:core-ktx:1.7.0'
54+
implementation 'androidx.appcompat:appcompat:1.4.1'
55+
implementation 'com.google.android.material:material:1.6.0'
56+
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
57+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1'
58+
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.4.1"
5359
implementation 'com.github.bumptech.glide:glide:4.12.0'
5460

5561
testImplementation 'junit:junit:4.13.2'

examples/DropboxAndroid/app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
android:roundIcon="@mipmap/ic_launcher_round"
1212
android:supportsRtl="true"
1313
android:theme="@style/Theme.DropboxAndroid">
14-
<activity android:name=".MainActivity">
14+
<activity
15+
android:name=".MainActivity"
16+
android:exported="true">
1517
<intent-filter>
1618
<action android:name="android.intent.action.MAIN" />
1719

@@ -21,11 +23,13 @@
2123
<activity
2224
android:name="com.dropbox.core.android.AuthActivity"
2325
android:configChanges="orientation|keyboard"
26+
android:exported="true"
2427
android:launchMode="singleTask">
2528
<intent-filter>
2629
<!-- Using a Manifest Placeholder to hide our app key -->
2730
<data android:scheme="db-${dropboxKey}" />
2831
<action android:name="android.intent.action.VIEW" />
32+
2933
<category android:name="android.intent.category.BROWSABLE" />
3034
<category android:name="android.intent.category.DEFAULT" />
3135
</intent-filter>

examples/DropboxAndroid/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
3-
ext.kotlin_version = "1.4.31"
3+
ext.kotlin_version = "1.6.21"
44
repositories {
55
google()
66
mavenCentral()
77
}
88
dependencies {
9-
classpath "com.android.tools.build:gradle:7.0.3"
9+
classpath "com.android.tools.build:gradle:7.2.0"
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111

1212
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## For more details on how to configure your build environment visit
2+
# http://www.gradle.org/docs/current/userguide/build_environment.html
3+
#
4+
# Specifies the JVM arguments used for the daemon process.
5+
# The setting is particularly useful for tweaking memory settings.
6+
# Default value: -Xmx1024m -XX:MaxPermSize=256m
7+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
8+
#
9+
# When configured, Gradle will run in incubating parallel mode.
10+
# This option should only be used with decoupled projects. More details, visit
11+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
12+
org.gradle.parallel=true
13+
android.useAndroidX=true
14+
org.gradle.unsafe.configuration-cache=false
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Mon Jul 12 10:33:19 PDT 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)