Skip to content

Commit 160c521

Browse files
authored
Add support for Upload widget, video preprocessing and separate modules.
* Add video/image preview UI with editing capabilities. * Add video preprocessing support. * Break SDK into separate modules.
1 parent 63cf6cf commit 160c521

File tree

185 files changed

+4742
-574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+4742
-574
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ android:
1515
components:
1616
- tools
1717
- platform-tools
18-
- build-tools-28.0.3
18+
- build-tools-29.0.2
1919
- android-21
20-
- android-28
20+
- android-29
2121
- extra-google-google_play_services
2222
- extra-google-m2repository
2323
- extra-android-m2repository

all/build.gradle

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 29
5+
buildToolsVersion "29.0.2"
6+
7+
8+
defaultConfig {
9+
minSdkVersion 14
10+
targetSdkVersion 29
11+
versionCode 1
12+
versionName "1.0"
13+
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
consumerProguardFiles 'consumer-rules.pro'
16+
}
17+
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
25+
}
26+
27+
dependencies {
28+
implementation fileTree(dir: 'libs', include: ['*.jar'])
29+
implementation project(path: ':core')
30+
implementation project(path: ':preprocess')
31+
implementation project(path: ':ui')
32+
33+
implementation 'androidx.appcompat:appcompat:1.1.0'
34+
testImplementation 'junit:junit:4.12'
35+
androidTestImplementation 'androidx.test:runner:1.2.0'
36+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
37+
}
38+
39+
ext {
40+
publishArtifactId = 'cloudinary-android'
41+
publishArtifactName = 'Cloudinary Android Library'
42+
jarFileName = "all"
43+
}
44+
45+
apply from: '../publish.gradle'

all/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<manifest package="com.cloudinary.android" />

core/build.gradle

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 29
5+
buildToolsVersion "29.0.2"
6+
7+
8+
defaultConfig {
9+
minSdkVersion 14
10+
targetSdkVersion 29
11+
versionCode 1
12+
versionName "1.0"
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14+
15+
// filter in the api credentials before building but without changing original source
16+
// files - to make sure the credentials are not checked into source control.
17+
// The url is taken from a property or environment variable:
18+
manifestPlaceholders = [cloudinaryUrl: getCloudinaryUrl() ?: ""]
19+
}
20+
21+
buildTypes {
22+
release {
23+
minifyEnabled false
24+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25+
consumerProguardFiles 'proguard-rules.pro'
26+
}
27+
}
28+
}
29+
30+
task verifyCloudinaryCredentials {
31+
doFirst {
32+
if (!getCloudinaryUrl()) {
33+
throw new GradleException("Missing credentials: please set CLOUDINARY_URL environment variable or cloudianryUrl property.")
34+
}
35+
}
36+
}
37+
38+
// Force cloudinary credentials when running unit tests and connected device tests
39+
tasks.matching { it.name.startsWith("connected") || it.name.startsWith("test")}.all { task ->
40+
task.dependsOn verifyCloudinaryCredentials
41+
}
42+
43+
dependencies {
44+
api "com.cloudinary:cloudinary-core:${cloudinaryLibsVersion}"
45+
46+
implementation 'androidx.core:core:1.2.0'
47+
implementation 'androidx.appcompat:appcompat:1.1.0'
48+
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
49+
implementation 'com.google.android.material:material:1.1.0'
50+
implementation('com.evernote:android-job:1.4.2', {
51+
exclude group: 'com.android.support', module: 'support-compat'
52+
})
53+
54+
testImplementation 'androidx.test.ext:junit:1.1.1'
55+
testImplementation "com.cloudinary:cloudinary-test-common:${cloudinaryLibsVersion}"
56+
androidTestImplementation 'org.awaitility:awaitility:3.0.0'
57+
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
58+
exclude group: 'com.android.support', module: 'support-annotations'
59+
})
60+
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
61+
androidTestImplementation 'androidx.test:runner:1.2.0'
62+
androidTestImplementation 'androidx.test:rules:1.2.0'
63+
androidTestImplementation "org.hamcrest:hamcrest-library:1.3"
64+
}
65+
66+
ext {
67+
publishArtifactId = 'cloudinary-android-core'
68+
publishArtifactName = 'Cloudinary Android Core Library'
69+
jarFileName = "core"
70+
}
71+
72+
apply from: '../publish.gradle'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
-keep class com.cloudinary.android.*Strategy
2+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<uses-sdk android:minSdkVersion="9" />
88

99
<instrumentation
10-
android:name="android.support.test.runner.AndroidJUnitRunner"
10+
android:name="androidx.test.runner.AndroidJUnitRunner"
1111
android:targetPackage="com.cloudinary.android" />
1212

1313
<uses-permission android:name="android.permission.INTERNET" />
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)