1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-22 11:06:05 -06:00

Update dependencies (#1448)

This commit is contained in:
Rafał Borcz 2021-08-25 20:49:44 +02:00 committed by GitHub
parent a6a2bcff3b
commit b4b9d91ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 22 additions and 33 deletions

View File

@ -3,11 +3,11 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.github.triplet.play'
apply plugin: 'ru.cian.huawei-publish'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.huawei.agconnect'
apply from: 'jacoco.gradle'
apply from: 'sonarqube.gradle'
@ -15,7 +15,6 @@ apply from: 'hooks.gradle'
android {
compileSdkVersion 30
buildToolsVersion '30.0.3'
defaultConfig {
applicationId "io.github.wulkanowy"
@ -98,7 +97,7 @@ android {
}
buildFeatures {
viewBinding = true
viewBinding true
}
testOptions.unitTests {
@ -107,12 +106,12 @@ android {
compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = "11"
freeCompilerArgs += ["-Xopt-in=kotlin.RequiresOptIn", "-Xjvm-default=all"]
}
@ -128,12 +127,6 @@ android {
kapt {
correctErrorTypes true
javacOptions {
//Bug workaround https://youtrack.jetbrains.com/issue/KT-47416
option("-Adagger.fastInit=ENABLED")
option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true")
}
}
play {
@ -168,7 +161,6 @@ dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1"
implementation "androidx.core:core-ktx:1.6.0"

View File

@ -2,7 +2,7 @@ apply plugin: "jacoco"
jacoco {
toolVersion "0.8.7"
reportsDirectory = file("$buildDir/reports")
reportsDirectory.set(file("$buildDir/reports"))
}
tasks.withType(Test) {
@ -16,8 +16,8 @@ task jacocoTestReport(type: JacocoReport) {
description = "Generate Jacoco coverage reports"
reports {
xml.enabled = true
html.enabled = true
xml.required.set(true)
html.required.set(true)
}
def excludes = ['**/R.class',

View File

@ -1,6 +1,5 @@
package io.github.wulkanowy.services.alarm
import android.annotation.SuppressLint
import android.app.PendingIntent
import android.app.PendingIntent.FLAG_UPDATE_CURRENT
import android.content.Context
@ -20,6 +19,7 @@ import io.github.wulkanowy.ui.modules.main.MainView
import io.github.wulkanowy.utils.flowWithResource
import io.github.wulkanowy.utils.getCompatColor
import io.github.wulkanowy.utils.toLocalDateTime
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
@ -50,7 +50,7 @@ class TimetableNotificationReceiver : HiltBroadcastReceiver() {
const val LESSON_END = "end_timestamp"
}
@SuppressLint("CheckResult")
@OptIn(DelicateCoroutinesApi::class)
override fun onReceive(context: Context, intent: Intent) {
super.onReceive(context, intent)
Timber.d("Receiving intent... ${intent.toUri(0)}")

View File

@ -230,8 +230,8 @@ class MainActivity : BaseActivity<MainPresenter, ActivityMainBinding>(), MainVie
.setIcon(R.drawable.ic_main_more)
}
selectedItemId = startMenuIndex
setOnNavigationItemSelectedListener { presenter.onTabSelected(it.itemId, false) }
setOnNavigationItemReselectedListener { presenter.onTabSelected(it.itemId, true) }
setOnItemSelectedListener { presenter.onTabSelected(it.itemId, false) }
setOnItemReselectedListener { presenter.onTabSelected(it.itemId, true) }
}
with(navController) {

View File

@ -23,8 +23,6 @@ import io.github.wulkanowy.ui.base.BaseActivity
import io.github.wulkanowy.utils.dpToPx
import io.github.wulkanowy.utils.hideSoftInput
import io.github.wulkanowy.utils.showSoftInput
import kotlinx.coroutines.FlowPreview
import timber.log.Timber
import javax.inject.Inject
@AndroidEntryPoint
@ -67,7 +65,6 @@ class SendMessageActivity : BaseActivity<SendMessagePresenter, ActivitySendMessa
override val messageSuccess: String
get() = getString(R.string.message_send_successful)
@FlowPreview
@Suppress("UNCHECKED_CAST")
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@ -221,6 +218,7 @@ class SendMessageActivity : BaseActivity<SendMessagePresenter, ActivitySendMessa
.show()
}
@Suppress("UNCHECKED_CAST")
override fun clearDraft() {
formRecipientsData = binding.sendMessageTo.addedChipItems as List<RecipientChipItem>
presenter.clearDraft()

View File

@ -1,6 +1,5 @@
package io.github.wulkanowy.ui.modules.message.send
import io.github.wulkanowy.R
import io.github.wulkanowy.data.Status
import io.github.wulkanowy.data.db.entities.Message
import io.github.wulkanowy.data.db.entities.Recipient
@ -41,7 +40,6 @@ class SendMessagePresenter @Inject constructor(
private val messageUpdateChannel = Channel<Unit>()
@FlowPreview
fun onAttachView(view: SendMessageView, message: Message?, reply: Boolean?) {
super.onAttachView(view)
view.initView()

View File

@ -21,7 +21,6 @@ import io.github.wulkanowy.ui.modules.message.MessageFragment
import io.github.wulkanowy.ui.modules.message.preview.MessagePreviewFragment
import io.github.wulkanowy.ui.widgets.DividerItemDecoration
import io.github.wulkanowy.utils.getThemeAttrColor
import kotlinx.coroutines.FlowPreview
import javax.inject.Inject
@AndroidEntryPoint
@ -58,7 +57,6 @@ class MessageTabFragment : BaseFragment<FragmentMessageTabBinding>(R.layout.frag
setHasOptionsMenu(true)
}
@FlowPreview
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
binding = FragmentMessageTabBinding.bind(view)

View File

@ -44,7 +44,6 @@ class MessageTabPresenter @Inject constructor(
private val searchChannel = Channel<String>()
@FlowPreview
fun onAttachView(view: MessageTabView, folder: MessageFolder) {
super.onAttachView(view)
view.initView()
@ -178,7 +177,7 @@ class MessageTabPresenter @Inject constructor(
}
}
@FlowPreview
@OptIn(FlowPreview::class)
private fun initializeSearchStream() {
launch {
searchChannel.consumeAsFlow()

View File

@ -35,6 +35,7 @@ import io.github.wulkanowy.utils.nextSchoolDay
import io.github.wulkanowy.utils.nickOrName
import io.github.wulkanowy.utils.previousSchoolDay
import io.github.wulkanowy.utils.toFormattedString
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import timber.log.Timber
@ -81,6 +82,7 @@ class TimetableWidgetProvider : HiltBroadcastReceiver() {
"timetable_widget_current_theme_$appWidgetId"
}
@OptIn(DelicateCoroutinesApi::class)
override fun onReceive(context: Context, intent: Intent) {
super.onReceive(context, intent)
GlobalScope.launch {

View File

@ -1,6 +1,6 @@
buildscript {
ext {
kotlin_version = '1.5.21'
kotlin_version = '1.5.30'
about_libraries = '8.9.1'
hilt_version = "2.38.1"
}

View File

@ -4,17 +4,19 @@
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
#
android.enableJetifier=true
android.useAndroidX=true
#
kotlin.code.style=official
kapt.incremental.apt=true
#
kapt.use.worker.api=true
kapt.include.compile.classpath=false
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects