Skip to content

Commit 2faf654

Browse files
authored
Merge pull request #104 from Mindinventory/develop
Develop
2 parents 5643c1d + 4bb448c commit 2faf654

File tree

16 files changed

+1113
-1011
lines changed

16 files changed

+1113
-1011
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Lassi is simplest way to pick media (either image, video, audio or doc)
6868
.setMaxCount(5)
6969
.setGridSize(3)
7070
.setMediaType(MediaType.VIDEO) // MediaType : VIDEO IMAGE, AUDIO OR DOC
71-
.setCompressionRation(10) // compress image for single item selection (can be 0 to 100)
71+
.setCompressionRatio(10) // compress image for single item selection (can be 0 to 100)
7272
.setMinTime(15) // for MediaType.VIDEO only
7373
.setMaxTime(30) // for MediaType.VIDEO only
7474
.setSupportedFileTypes("mp4", "mkv", "webm", "avi", "flv", "3gp") // Filter by limited media format (Optional)

app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ plugins {
99

1010
android {
1111
namespace 'com.lassi.app'
12-
compileSdk 33
12+
compileSdk 34
1313
defaultConfig {
1414
applicationId "com.lassi.app"
1515
minSdk 21
16-
targetSdk 33
16+
targetSdk 34
1717
versionCode 1
1818
versionName "1.0"
1919
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -48,13 +48,13 @@ android {
4848
dependencies {
4949
implementation fileTree(dir: 'libs', include: ['*.jar'])
5050
implementation 'androidx.appcompat:appcompat:1.6.1'
51-
implementation 'androidx.core:core-ktx:1.10.0'
51+
implementation 'androidx.core:core-ktx:1.10.1'
5252
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5353
testImplementation 'junit:junit:4.13.2'
5454
androidTestImplementation 'androidx.test:runner:1.5.2'
5555
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
5656
implementation project(path: ':lassi')
57-
implementation 'androidx.recyclerview:recyclerview:1.3.0'
57+
implementation 'androidx.recyclerview:recyclerview:1.3.1'
5858
implementation 'androidx.cardview:cardview:1.0.0'
5959

6060
implementation 'com.github.bumptech.glide:glide:4.14.2'

app/src/main/java/com/lassi/app/MainActivity.kt

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import com.lassi.common.utils.KeyUtils
2020
import com.lassi.data.media.MiMedia
2121
import com.lassi.domain.media.LassiOption
2222
import com.lassi.domain.media.MediaType
23+
import com.lassi.domain.media.SortingOption
2324
import com.lassi.presentation.builder.Lassi
2425
import com.lassi.presentation.common.decoration.GridSpacingItemDecoration
2526
import com.lassi.presentation.cropper.CropImageView
@@ -55,6 +56,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
5556
val intent = Lassi(this)
5657
.with(LassiOption.CAMERA_AND_GALLERY)
5758
.setMaxCount(1)
59+
.setAscSort(SortingOption.ASCENDING)
5860
.setGridSize(2)
5961
.setPlaceHolder(R.drawable.ic_image_placeholder)
6062
.setErrorDrawable(R.drawable.ic_image_placeholder)
@@ -68,7 +70,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
6870
.setGalleryBackgroundColor(R.color.colorGrey)
6971
.setCropType(CropImageView.CropShape.OVAL)
7072
.setCropAspectRatio(1, 1)
71-
.setCompressionRation(10)
73+
.setCompressionRatio(10)
7274
.setMinFileSize(0)
7375
.setMaxFileSize(10000)
7476
.enableActualCircleCrop()
@@ -177,7 +179,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
177179
.setMediaType(MediaType.IMAGE)
178180
.setCropType(CropImageView.CropShape.OVAL)
179181
.setCropAspectRatio(1, 1)
180-
.setCompressionRation(0)
182+
.setCompressionRatio(0)
181183
.setMinFileSize(0)
182184
.setMaxFileSize(1000000)
183185
.enableActualCircleCrop()
@@ -208,7 +210,7 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
208210
.setGalleryBackgroundColor(R.color.colorGrey)
209211
.setCropType(CropImageView.CropShape.OVAL)
210212
.setCropAspectRatio(1, 1)
211-
.setCompressionRation(0)
213+
.setCompressionRatio(0)
212214
.setMinFileSize(0)
213215
.setMaxFileSize(10000)
214216
.enableActualCircleCrop()

build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
agp_version = '8.1.1'
6+
}
47
ext.kotlin_version = '1.8.20'
58
repositories {
69
google()
@@ -11,7 +14,7 @@ buildscript {
1114
}
1215
}
1316
dependencies {
14-
classpath 'com.android.tools.build:gradle:8.0.1'
17+
classpath "com.android.tools.build:gradle:$agp_version"
1518
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1619
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
1720
// NOTE: Do not place your application dependencies here; they belong
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon May 15 16:07:45 IST 2023
1+
#Thu Aug 31 11:56:21 IST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

lassi/build.gradle

+13-13
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ group='com.github.Mindinventory'
1010

1111
android {
1212
namespace 'com.lassi'
13-
compileSdk 33
13+
compileSdk 34
1414
defaultConfig {
1515
minSdk 21
16-
targetSdk 33
17-
versionCode 25
18-
versionName "1.2.0"
16+
targetSdk 34
17+
versionCode 26
18+
versionName "1.3.0"
1919
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2020
vectorDrawables.useSupportLibrary = true
2121
multiDexEnabled true
@@ -49,10 +49,10 @@ android {
4949
dependencies {
5050
implementation fileTree(dir: 'libs', include: ['*.jar'])
5151
implementation 'androidx.appcompat:appcompat:1.6.1'
52-
implementation 'androidx.core:core-ktx:1.10.0'
52+
implementation 'androidx.core:core-ktx:1.10.1'
5353
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5454
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
55-
implementation "androidx.recyclerview:recyclerview:1.3.0"
55+
implementation "androidx.recyclerview:recyclerview:1.3.1"
5656
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
5757
implementation 'com.github.livefront:bridge:v1.2.0'
5858
testImplementation 'junit:junit:4.13.2'
@@ -62,25 +62,25 @@ dependencies {
6262
implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
6363

6464
// Google material
65-
implementation 'com.google.android.material:material:1.8.0'
65+
implementation 'com.google.android.material:material:1.9.0'
6666

6767
// glide
6868
implementation 'com.github.bumptech.glide:glide:4.14.2'
6969
kapt 'com.github.bumptech.glide:compiler:4.14.2'
7070
implementation 'androidx.exifinterface:exifinterface:1.3.6'
7171

72-
implementation "androidx.activity:activity-ktx:1.7.1"
73-
implementation 'androidx.fragment:fragment-ktx:1.5.7'
72+
implementation "androidx.activity:activity-ktx:1.7.2"
73+
implementation 'androidx.fragment:fragment-ktx:1.6.1'
7474

7575
implementation "androidx.multidex:multidex:2.0.1"
7676

7777
// Room DB
78-
implementation 'androidx.room:room-runtime:2.5.1'
79-
kapt 'androidx.room:room-compiler:2.5.1'
80-
implementation 'androidx.room:room-ktx:2.5.1'
78+
implementation 'androidx.room:room-runtime:2.5.2'
79+
kapt 'androidx.room:room-compiler:2.5.2'
80+
implementation 'androidx.room:room-ktx:2.5.2'
8181

8282
//Coroutine
83-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
83+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1'
8484

8585
//Gson
8686
implementation 'com.google.code.gson:gson:2.10'

lassi/src/main/AndroidManifest.xml

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
<uses-permission android:name="android.permission.CAMERA" />
55
<uses-permission android:name="android.permission.RECORD_AUDIO" />
66

7-
<!-- Required only if your app targets Android 13. -->
7+
<!-- Required only if your app targets Android 13+. -->
88
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
99
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
1010
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
1111

1212
<!-- Required to maintain app compatibility. -->
13-
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
14-
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
13+
<uses-permission
14+
android:name="android.permission.READ_EXTERNAL_STORAGE"
15+
android:maxSdkVersion="32" />
16+
<uses-permission
17+
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
18+
android:maxSdkVersion="32" />
1519

1620
<application
1721
android:requestLegacyExternalStorage="true"

lassi/src/main/java/com/lassi/common/utils/KeyUtils.kt

+3
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@ object KeyUtils {
1515
const val TEN_SECOND_INTERVAL = 10 * 1000L
1616
const val SETTINGS_REQUEST_CODE = 100
1717
const val DEFAULT_FILE_SIZE = 0L
18+
const val DESCENDING_ORDER = 0
19+
const val ASCENDING_ORDER = 1
20+
const val DEFAULT_ORDER = 2
1821
}

0 commit comments

Comments
 (0)