diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5acc0634f4b87beb21ca5a3bb130bcc01987761a..4d3a8ff5d71ce0f9b2647573937320657d616298 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -13,14 +13,11 @@ android { defaultConfig { applicationId = "com.iskrembilen.quasseldroid" - setMinSdkVersion(21) - setTargetSdkVersion(30) + minSdk = 21 + targetSdk = 30 testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - // Disable test runner analytics - testInstrumentationRunnerArguments(mapOf( - "disableAnalytics" to "true" - )) + testInstrumentationRunnerArguments["disableAnalytics"] = "true" } buildTypes { @@ -54,10 +51,6 @@ android { val androidxComposeVersion: String by project kotlinCompilerExtensionVersion = androidxComposeVersion } - - kotlinOptions { - useIR = true - } } kapt { @@ -75,9 +68,19 @@ dependencies { implementation("com.google.android.material", "material", mdcVersion) val androidxComposeVersion: String by project - implementation("androidx.compose.ui", "ui", androidxComposeVersion) + implementation("androidx.compose.foundation", "foundation", androidxComposeVersion) + implementation("androidx.compose.foundation", "foundation-layout", androidxComposeVersion) implementation("androidx.compose.material", "material", androidxComposeVersion) + implementation("androidx.compose.material", "material-icons-extended", androidxComposeVersion) + implementation("androidx.compose.runtime", "runtime", androidxComposeVersion) + implementation("androidx.compose.runtime", "runtime-livedata", androidxComposeVersion) implementation("androidx.compose.ui", "ui-tooling", androidxComposeVersion) + implementation("androidx.compose.ui", "ui-util", androidxComposeVersion) + implementation("androidx.compose.ui", "ui-viewbinding", androidxComposeVersion) + testImplementation("androidx.compose.ui", "ui-test", androidxComposeVersion) + + val androidxActivityComposeVersion: String by project + implementation("androidx.activity", "activity-compose", androidxActivityComposeVersion) val androidxLifecycleVersion: String by project implementation("androidx.lifecycle", "lifecycle-runtime-ktx", androidxLifecycleVersion) @@ -93,10 +96,10 @@ dependencies { androidTestImplementation("com.google.dagger", "hilt-android-testing", daggerHiltVersion) androidTestAnnotationProcessor("com.google.dagger", "hilt-android-compiler", daggerHiltVersion) - implementation("org.threeten", "threetenbp", "1.4.0") + implementation("org.threeten", "threetenbp", "1.5.1") - implementation("io.coil-kt", "coil", "1.1.1") - implementation("dev.chrisbanes.accompanist", "accompanist-coil", "0.5.0") + implementation("io.coil-kt", "coil", "1.2.2") + implementation("com.google.accompanist", "accompanist-coil", "0.11.1") val libquasselVersion: String by project implementation("de.justjanne.libquassel", "libquassel-client", libquasselVersion) diff --git a/app/src/main/java/de/justjanne/quasseldroid/app/MainActivity.kt b/app/src/main/java/de/justjanne/quasseldroid/app/MainActivity.kt index 4f2b03210d96fa219f97fd64fe6469685d4591ed..ddff609945ae4679cf9e7072da53cd373112d54e 100644 --- a/app/src/main/java/de/justjanne/quasseldroid/app/MainActivity.kt +++ b/app/src/main/java/de/justjanne/quasseldroid/app/MainActivity.kt @@ -20,7 +20,9 @@ package de.justjanne.quasseldroid.app import android.os.Bundle +import androidx.activity.compose.setContent import androidx.appcompat.app.AppCompatActivity +import androidx.compose.foundation.Image import androidx.compose.foundation.border import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -47,14 +49,13 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.setContent import androidx.compose.ui.text.AnnotatedString import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.lifecycle.lifecycleScope -import dev.chrisbanes.accompanist.coil.CoilImage +import com.google.accompanist.coil.rememberCoilPainter import kotlinx.coroutines.delay import kotlinx.coroutines.flow.MutableStateFlow import org.threeten.bp.ZonedDateTime @@ -63,7 +64,8 @@ import kotlin.random.Random val time = MutableStateFlow(ZonedDateTime.now()) -inline class Password1(private val s: String) +@JvmInline +value class Password1(private val s: String) class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { @@ -92,8 +94,11 @@ fun UserPhoto( modifier: Modifier = Modifier, ) { val ringColor = remember { randomColor() } - CoilImage( - data = imageUrl as Any, + Image( + painter = rememberCoilPainter( + imageUrl, + fadeIn = true + ), contentDescription = null, modifier = modifier .border(2.dp, ringColor, CircleShape) @@ -224,7 +229,7 @@ fun JetChat() { Scaffold( topBar = { TimeDisplay() }, bottomBar = { InputLine() }, - bodyContent = { + content = { Column { ChatMessage( authorName = "Ali Conors", diff --git a/build.gradle b/build.gradle deleted file mode 100644 index bec9fa1f21c00e11a2d01b5cda2ee3cf60cd5c95..0000000000000000000000000000000000000000 --- a/build.gradle +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Quasseldroid - Quassel client for Android - * - * Copyright (c) 2019 Janne Mareike Koschinski - * Copyright (c) 2019 The Quassel Project - * - * This program is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 3 as published - * by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see <http://www.gnu.org/licenses/>. - */ diff --git a/build.gradle.kts b/build.gradle.kts index e29f9d93bca5c9bc833e15b425a82f467c876ac8..fc5e372ff1bbb27425b3ac7e88b7ab3e79823e6b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,27 +20,25 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - id("org.jlleitschuh.gradle.ktlint") version "10.0.0" + id("org.jlleitschuh.gradle.ktlint") version "10.1.0" } buildscript { repositories { google() mavenCentral() - jcenter() } dependencies { - classpath("com.android.tools.build", "gradle", "7.0.0-alpha05") - classpath("org.jetbrains.kotlin", "kotlin-gradle-plugin", "1.4.30") - classpath("com.google.dagger", "hilt-android-gradle-plugin", "2.31.2-alpha") + classpath("com.android.tools.build", "gradle", "7.1.0-alpha02") + classpath("org.jetbrains.kotlin", "kotlin-gradle-plugin", "1.5.10") + classpath("com.google.dagger", "hilt-android-gradle-plugin", "2.37") } } -allprojects { +subprojects { repositories { google() mavenCentral() - jcenter() } tasks.withType<KotlinCompile>().configureEach { diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index cd1f563efe776ef9c78366bc73a82dcaf3d1fcf0..2f0c29f38f62448b8339a7f7d4b09f00bf1655e9 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -31,8 +31,8 @@ repositories { } dependencies { - implementation("com.android.tools.build:gradle:7.0.0-alpha05") - implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21-2") + implementation("com.android.tools.build:gradle:7.1.0-alpha02") + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10") implementation(gradleApi()) implementation(localGroovy()) } diff --git a/gradle.properties b/gradle.properties index d7f8c0680929a0d6f19712ee4a384573b837a38b..077f3804f742b87a4963eed73205b845605247ba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,18 +32,20 @@ org.gradle.caching=true # Enable AndroidX android.useAndroidX=true android.enableJetifier=true +android.jetifier.ignorelist=bcprov-jdk15on # Dependency versions -androidxAppcompatVersion=1.2.0 -androidxCoreVersion=1.2.0 -androidxComposeVersion=1.0.0-alpha11 -androidxLifecycleVersion=2.3.0-rc01 +androidxActivityComposeVersion=1.3.0-beta01 +androidxAppcompatVersion=1.3.0 +androidxCoreVersion=1.6.0-beta02 +androidxComposeVersion=1.0.0-beta08 +androidxLifecycleVersion=2.3.1 androidxMultidexVersion=2.0.1 -daggerHiltVersion=2.31.2-alpha -hamcrestVersion=2.1 -junit4Version=4.13.1 -junit5Version=5.3.1 -kotlinBitflagsVersion=1.0.1 -libquasselVersion=0.1.0 -mdcVersion=1.2.1 +daggerHiltVersion=2.37 +hamcrestVersion=2.2 +junit4Version=4.13.2 +junit5Version=5.7.2 +kotlinBitflagsVersion=1.3.0 +libquasselVersion=0.6.1 +mdcVersion=1.3.0 sl4jVersion=1.7.30 -testcontainersCiVersion=1.0.0 +testcontainersCiVersion=1.3.0 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 78f43eab3d62f86be3fb6126b31f9cf60bdc91e0..4e77d0c203e267007aea1a769f2a6f4846edb9bf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip -distributionSha256Sum=8de6efc274ab52332a9c820366dd5cf5fc9d35ec7078fd70c8ec6913431ee610 +distributionSha256Sum=0e46229820205440b48a5501122002842b82886e76af35f0f3a069243dca4b3c +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle.kts b/settings.gradle.kts index 32626fab37ec170cef226fb14b0ca56f3b716c23..ef0ce5d149e88a7acfca3b415198efa5a4f8a1e7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,9 +23,3 @@ rootProject.buildFileName = "build.gradle.kts" include( ":app" ) - -pluginManagement { - repositories { - gradlePluginPortal() - } -}