From 853ee3143c1a41d04fb42a64637adecf96f3f081 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 8 Mar 2019 21:03:19 +0100 Subject: [PATCH] updating gradle, kotlin, commons --- app/build.gradle | 2 +- .../simplemobiletools/notes/pro/activities/MainActivity.kt | 4 ++-- build.gradle | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 95684c94..1cf2608d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -51,7 +51,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.6.17' + implementation 'com.simplemobiletools:commons:5.10.6' kapt 'androidx.room:room-compiler:2.0.0' implementation 'androidx.room:room-runtime:2.0.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt index fa1b2a66..5f99acf5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/notes/pro/activities/MainActivity.kt @@ -537,7 +537,7 @@ class MainActivity : SimpleActivity() { private fun exportNoteValueToFile(path: String, content: String, showSuccessToasts: Boolean, callback: ((success: Boolean) -> Unit)? = null) { try { - if (getIsPathDirectory(path)) { + if (File(path).isDirectory) { toast(R.string.name_taken) return } @@ -545,7 +545,7 @@ class MainActivity : SimpleActivity() { if (needsStupidWritePermissions(path)) { handleSAFDialog(path) { var document = getDocumentFile(File(path).parent) ?: return@handleSAFDialog - if (!getDoesFilePathExist(path)) { + if (!File(path).exists()) { document = document.createFile("", path.getFilenameFromPath())!! } diff --git a/build.gradle b/build.gradle index 7694217e..41310870 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.3.20' + ext.kotlin_version = '1.3.21' repositories { google() @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.android.tools.build:gradle:3.3.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong