updating kotlin, commons, gradle
This commit is contained in:
parent
ec8525f8ed
commit
3656d90841
6 changed files with 6 additions and 22 deletions
|
@ -58,7 +58,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.16.12'
|
implementation 'com.simplemobiletools:commons:5.16.16'
|
||||||
implementation 'joda-time:joda-time:2.10.1'
|
implementation 'joda-time:joda-time:2.10.1'
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
package com.simplemobiletools.calendar.pro.extensions
|
|
||||||
|
|
||||||
import com.simplemobiletools.calendar.pro.helpers.CHOPPED_LIST_DEFAULT_SIZE
|
|
||||||
|
|
||||||
// inspired by https://stackoverflow.com/questions/2895342/java-how-can-i-split-an-arraylist-in-multiple-small-arraylists/2895365#2895365
|
|
||||||
fun MutableList<Long>.getChoppedList(chunkSize: Int = CHOPPED_LIST_DEFAULT_SIZE): ArrayList<ArrayList<Long>> {
|
|
||||||
val parts = ArrayList<ArrayList<Long>>()
|
|
||||||
val listSize = this.size
|
|
||||||
var i = 0
|
|
||||||
while (i < listSize) {
|
|
||||||
val newList = subList(i, Math.min(listSize, i + chunkSize)).toMutableList() as ArrayList<Long>
|
|
||||||
parts.add(newList)
|
|
||||||
i += chunkSize
|
|
||||||
}
|
|
||||||
return parts
|
|
||||||
}
|
|
|
@ -17,7 +17,6 @@ const val CALDAV = "Caldav"
|
||||||
const val VIEW_TO_OPEN = "view_to_open"
|
const val VIEW_TO_OPEN = "view_to_open"
|
||||||
const val SHORTCUT_NEW_EVENT = "shortcut_new_event"
|
const val SHORTCUT_NEW_EVENT = "shortcut_new_event"
|
||||||
const val REGULAR_EVENT_TYPE_ID = 1L
|
const val REGULAR_EVENT_TYPE_ID = 1L
|
||||||
const val CHOPPED_LIST_DEFAULT_SIZE = 100
|
|
||||||
|
|
||||||
const val MONTHLY_VIEW = 1
|
const val MONTHLY_VIEW = 1
|
||||||
const val YEARLY_VIEW = 2
|
const val YEARLY_VIEW = 2
|
||||||
|
|
|
@ -7,6 +7,7 @@ import com.simplemobiletools.calendar.pro.R
|
||||||
import com.simplemobiletools.calendar.pro.extensions.*
|
import com.simplemobiletools.calendar.pro.extensions.*
|
||||||
import com.simplemobiletools.calendar.pro.models.Event
|
import com.simplemobiletools.calendar.pro.models.Event
|
||||||
import com.simplemobiletools.calendar.pro.models.EventType
|
import com.simplemobiletools.calendar.pro.models.EventType
|
||||||
|
import com.simplemobiletools.commons.extensions.getChoppedList
|
||||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||||
|
|
||||||
class EventsHelper(val context: Context) {
|
class EventsHelper(val context: Context) {
|
||||||
|
|
|
@ -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.3.41'
|
ext.kotlin_version = '1.3.50'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
@ -10,7 +10,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.2'
|
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "de.timfreiheit.resourceplaceholders:placeholders:0.3"
|
classpath "de.timfreiheit.resourceplaceholders:placeholders:0.3"
|
||||||
|
|
||||||
|
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
||||||
#Tue Apr 30 17:49:00 CEST 2019
|
#Sun Aug 25 21:51:10 CEST 2019
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||||
|
|
Loading…
Reference in a new issue