mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-17 08:47:22 +02:00
updating commons, sdk, kotlin
This commit is contained in:
parent
469816589f
commit
d6067001ff
@ -3,13 +3,13 @@ apply plugin: 'kotlin-android'
|
|||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
buildToolsVersion "27.0.3"
|
buildToolsVersion "28.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.simplemobiletools.notes"
|
applicationId "com.simplemobiletools.notes"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
versionCode 50
|
versionCode 50
|
||||||
versionName "4.2.0"
|
versionName "4.2.0"
|
||||||
setProperty("archivesBaseName", "notes")
|
setProperty("archivesBaseName", "notes")
|
||||||
@ -40,16 +40,9 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
|
||||||
leakCanaryVersion = '1.5.4'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:4.6.5'
|
implementation 'com.simplemobiletools:commons:4.7.5'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
|
|
||||||
debugImplementation "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion"
|
|
||||||
releaseImplementation "com.squareup.leakcanary:leakcanary-android-no-op:$leakCanaryVersion"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties props = new Properties()
|
Properties props = new Properties()
|
||||||
|
@ -3,16 +3,11 @@ package com.simplemobiletools.notes
|
|||||||
import android.app.Application
|
import android.app.Application
|
||||||
import com.facebook.stetho.Stetho
|
import com.facebook.stetho.Stetho
|
||||||
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
||||||
import com.squareup.leakcanary.LeakCanary
|
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
if (LeakCanary.isInAnalyzerProcess(this)) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
LeakCanary.install(this)
|
|
||||||
Stetho.initializeWithDefaults(this)
|
Stetho.initializeWithDefaults(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
|||||||
|
|
||||||
private fun openFile(path: String, checkTitle: Boolean, onChecksPassed: (file: File) -> Unit) {
|
private fun openFile(path: String, checkTitle: Boolean, onChecksPassed: (file: File) -> Unit) {
|
||||||
val file = File(path)
|
val file = File(path)
|
||||||
if (path.isImageVideoGif()) {
|
if (path.isMediaFile()) {
|
||||||
toast(R.string.invalid_file_format)
|
toast(R.string.invalid_file_format)
|
||||||
} else if (file.length() > 10 * 1000 * 1000) {
|
} else if (file.length() > 10 * 1000 * 1000) {
|
||||||
toast(R.string.file_too_large)
|
toast(R.string.file_too_large)
|
||||||
|
@ -4,7 +4,7 @@ import android.support.v7.app.AlertDialog
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
import com.simplemobiletools.commons.extensions.getFilenameFromPath
|
||||||
import com.simplemobiletools.commons.extensions.humanizePath
|
import com.simplemobiletools.commons.extensions.humanizePath
|
||||||
import com.simplemobiletools.commons.extensions.isImageVideoGif
|
import com.simplemobiletools.commons.extensions.isMediaFile
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.notes.R
|
import com.simplemobiletools.notes.R
|
||||||
import com.simplemobiletools.notes.activities.SimpleActivity
|
import com.simplemobiletools.notes.activities.SimpleActivity
|
||||||
@ -42,7 +42,7 @@ class ImportFolderDialog(val activity: SimpleActivity, val path: String, val cal
|
|||||||
val filename = file.path.getFilenameFromPath()
|
val filename = file.path.getFilenameFromPath()
|
||||||
when {
|
when {
|
||||||
file.isDirectory -> false
|
file.isDirectory -> false
|
||||||
filename.isImageVideoGif() -> false
|
filename.isMediaFile() -> false
|
||||||
file.length() > 10 * 1000 * 1000 -> false
|
file.length() > 10 * 1000 * 1000 -> false
|
||||||
activity.dbHelper.doesTitleExist(filename) -> false
|
activity.dbHelper.doesTitleExist(filename) -> false
|
||||||
else -> true
|
else -> true
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.60'
|
ext.kotlin_version = '1.2.61'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user