Update Kotlinter to 3.15.0
This commit is contained in:
2
.editorconfig
Normal file
2
.editorconfig
Normal file
@@ -0,0 +1,2 @@
|
||||
[*.{kt,kts}]
|
||||
ktlint_code_style = android
|
||||
@@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'kotlin-android'
|
||||
id 'org.jmailen.kotlinter' version '3.13.0'
|
||||
id 'org.jmailen.kotlinter' version '3.15.0'
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
@@ -17,12 +17,6 @@ import com.google.android.material.snackbar.Snackbar
|
||||
import com.google.gson.Gson
|
||||
import com.squareup.picasso.Picasso.LoadedFrom
|
||||
import com.squareup.picasso.Target
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import okio.Buffer
|
||||
import org.threeten.bp.OffsetDateTime
|
||||
import java.io.BufferedReader
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
@@ -31,6 +25,12 @@ import java.net.MalformedURLException
|
||||
import java.net.URI
|
||||
import java.net.URISyntaxException
|
||||
import java.net.URL
|
||||
import kotlinx.coroutines.CoroutineDispatcher
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import okio.Buffer
|
||||
import org.threeten.bp.OffsetDateTime
|
||||
|
||||
internal object Utils {
|
||||
val JSON: Gson = JSON().gson
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.github.gotify.api
|
||||
|
||||
import retrofit2.Call
|
||||
import java.io.IOException
|
||||
import retrofit2.Call
|
||||
|
||||
internal object Api {
|
||||
@Throws(ApiException::class)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.github.gotify.api
|
||||
|
||||
import retrofit2.Response
|
||||
import java.io.IOException
|
||||
import retrofit2.Response
|
||||
|
||||
internal class ApiException : Exception {
|
||||
var body: String = ""
|
||||
|
||||
@@ -51,7 +51,10 @@ internal class Callback<T> private constructor(
|
||||
)
|
||||
}
|
||||
|
||||
fun <T> call(onSuccess: SuccessCallback<T> = SuccessCallback {}, onError: ErrorCallback = ErrorCallback {}): retrofit2.Callback<T> {
|
||||
fun <T> call(
|
||||
onSuccess: SuccessCallback<T> = SuccessCallback {},
|
||||
onError: ErrorCallback = ErrorCallback {}
|
||||
): retrofit2.Callback<T> {
|
||||
return RetrofitCallback(merge(of(onSuccess, onError), errorCallback()))
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.annotation.SuppressLint
|
||||
import com.github.gotify.SSLSettings
|
||||
import com.github.gotify.Utils
|
||||
import com.github.gotify.log.Log
|
||||
import okhttp3.OkHttpClient
|
||||
import java.io.IOException
|
||||
import java.security.GeneralSecurityException
|
||||
import java.security.KeyStore
|
||||
@@ -16,6 +15,7 @@ import javax.net.ssl.SSLContext
|
||||
import javax.net.ssl.TrustManager
|
||||
import javax.net.ssl.TrustManagerFactory
|
||||
import javax.net.ssl.X509TrustManager
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
internal object CertUtils {
|
||||
@SuppressLint("CustomX509TrustManager")
|
||||
|
||||
@@ -31,8 +31,8 @@ import com.github.gotify.log.LogsActivity
|
||||
import com.github.gotify.log.UncaughtExceptionHandler
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
import okhttp3.HttpUrl
|
||||
import java.security.cert.X509Certificate
|
||||
import okhttp3.HttpUrl
|
||||
|
||||
internal class LoginActivity : AppCompatActivity() {
|
||||
companion object {
|
||||
|
||||
@@ -26,9 +26,9 @@ import com.github.gotify.databinding.MessageItemCompactBinding
|
||||
import com.github.gotify.messages.provider.MessageWithImage
|
||||
import com.squareup.picasso.Picasso
|
||||
import io.noties.markwon.Markwon
|
||||
import org.threeten.bp.OffsetDateTime
|
||||
import java.text.DateFormat
|
||||
import java.util.Date
|
||||
import org.threeten.bp.OffsetDateTime
|
||||
|
||||
internal class ListMessageAdapter(
|
||||
private val context: Context,
|
||||
|
||||
@@ -56,9 +56,9 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.navigation.NavigationView
|
||||
import com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import java.io.IOException
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.io.IOException
|
||||
|
||||
internal class MessagesActivity :
|
||||
AppCompatActivity(),
|
||||
|
||||
@@ -11,10 +11,10 @@ import com.github.gotify.client.model.Application
|
||||
import com.github.gotify.log.Log
|
||||
import com.squareup.picasso.OkHttp3Downloader
|
||||
import com.squareup.picasso.Picasso
|
||||
import okhttp3.Cache
|
||||
import okhttp3.OkHttpClient
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import okhttp3.Cache
|
||||
import okhttp3.OkHttpClient
|
||||
|
||||
internal class PicassoHandler(private val context: Context, private val settings: Settings) {
|
||||
companion object {
|
||||
|
||||
@@ -10,15 +10,15 @@ import com.github.gotify.Utils
|
||||
import com.github.gotify.api.CertUtils
|
||||
import com.github.gotify.client.model.Message
|
||||
import com.github.gotify.log.Log
|
||||
import java.util.Calendar
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import okhttp3.HttpUrl
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import okhttp3.WebSocket
|
||||
import okhttp3.WebSocketListener
|
||||
import java.util.Calendar
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
internal class WebSocketConnection(
|
||||
private val baseUrl: String,
|
||||
|
||||
@@ -141,7 +141,7 @@ internal class WebSocketService : Service() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationSupport.createChannels(
|
||||
this,
|
||||
(this.getSystemService(NOTIFICATION_SERVICE) as NotificationManager),
|
||||
(getSystemService(NOTIFICATION_SERVICE) as NotificationManager),
|
||||
apps
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user