Skip to content

Commit

Permalink
Merge pull request #29 from ChochaNaresh/Dev
Browse files Browse the repository at this point in the history
- bug fixed #28
  • Loading branch information
ChochaNaresh authored Sep 4, 2023
2 parents d28f16c + 6fee9ea commit de4e3b2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application").version("8.0.2").apply(false)
id("com.android.library").version("8.0.2").apply(false)
kotlin("android").version("1.8.22").apply(false)
id("io.gitlab.arturbosch.detekt").version("1.23.0").apply(false)
id("com.android.application").version("8.1.1").apply(false)
id("com.android.library").version("8.1.1").apply(false)
kotlin("android").version("1.9.0").apply(false)
id("io.gitlab.arturbosch.detekt").version("1.23.1").apply(false)
}

tasks.register("clean", Delete::class) {
Expand Down
7 changes: 4 additions & 3 deletions filepickerlibrary/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("kotlin-parcelize")
id("kotlin-kapt")
id("io.gitlab.arturbosch.detekt")
id("maven-publish")
}

android {
namespace = "com.nareshchocha.filepickerlibrary"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 21
Expand Down Expand Up @@ -123,7 +124,7 @@ publishing {
}

detekt {
toolVersion = "1.23.0"
config = files("config/detekt/detekt.yml")
toolVersion = "1.23.1"
config.setFrom("$projectDir/config/detekt/detekt.yml")
buildUponDefaultConfig = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ internal class DocumentFilePickerActivity : AppCompatActivity() {

private fun getPermission(): String {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
Manifest.permission.READ_MEDIA_IMAGES
Manifest.permission.READ_MEDIA_VIDEO
} else {
Manifest.permission.READ_EXTERNAL_STORAGE
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ internal object FileUtils {
private fun Context.getDownloadsDocumentPath(uri: Uri): String? {
val fileName = getFilePath(this, uri)
if (fileName != null) {
Environment.getExternalStorageDirectory()
return Environment.getExternalStorageDirectory()
.toString() + "/Download/" + fileName
}
var id = DocumentsContract.getDocumentId(uri)
Expand Down
8 changes: 4 additions & 4 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ plugins {

android {
namespace = "com.nareshchocha.filepicker"
compileSdk = 33
compileSdk = 34

defaultConfig {
applicationId = "com.nareshchocha.filepicker"
minSdk = 21
targetSdk = 33
versionCode = 1
versionName = "1.0"
targetSdk = 34
versionCode = 2
versionName = "1.1"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments.putAll(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class MainActivity : AppCompatActivity() {
.pickDocumentFileBuild(
DocumentFilePickerConfig(
allowMultiple = true,

mMimeTypes = listOf("application/pdf", "image/*"),
),
),
Expand Down

0 comments on commit de4e3b2

Please sign in to comment.