Skip to content

Commit

Permalink
chore: update everything (#102)
Browse files Browse the repository at this point in the history
* chore: update everything

* apply false
  • Loading branch information
rushiiMachine authored Dec 12, 2022
1 parent d9366c1 commit 4aa8cd2
Show file tree
Hide file tree
Showing 16 changed files with 244 additions and 167 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("kotlin-parcelize")
id("com.google.devtools.ksp")
kotlin("android")
kotlin("plugin.parcelize")
kotlin("plugin.serialization")
id("com.google.devtools.ksp") version "1.7.10-1.0.6"
}

android {
Expand Down Expand Up @@ -124,7 +124,7 @@ dependencies {

// Use java.time.* on Android <= 8
// https://developer.android.com/studio/write/java8-support#library-desugaring-versions
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.0")

Dependencies.Koin(this)
Dependencies.Ktor(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun Settings(
Scaffold(
modifier = modifier,
topBar = {
SmallTopAppBar(
TopAppBar(
title = { Text(stringResource(R.string.settings_title)) },
navigationIcon = {
IconButton(onClick = onBackClick) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fun Chat(
Scaffold(
modifier = modifier,
topBar = {
SmallTopAppBar(
TopAppBar(
title = { Text(stringResource(R.string.chat_title, viewModel.channelName)) },
navigationIcon = {
IconButton(onChannelsButtonClick) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fun LoginScreen(
modifier = Modifier.fillMaxSize(),
topBar = {
Column(modifier = Modifier.fillMaxWidth()) {
SmallTopAppBar(
TopAppBar(
title = { Text(stringResource(R.string.login_action_login)) },
navigationIcon = {
IconButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fun PinsScreen(
modifier = modifier
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
SmallTopAppBar(
TopAppBar(
title = { Text(stringResource(R.string.pins_title)) },
navigationIcon = {
IconButton(onClick = onBackClick) {
Expand Down
5 changes: 4 additions & 1 deletion bottom-dialog-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@ android {

kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = freeCompilerArgs + "-Xexplicit-api=strict"
}
}

kotlin {
explicitApi()
}

dependencies {
implementation(Dependencies.Material.material)
implementation(Dependencies.Compose.foundation)
Expand Down
16 changes: 1 addition & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.2.2")

val kotlinVersion = "1.7.10"
classpath(kotlin("gradle-plugin", version = kotlinVersion))
classpath(kotlin("serialization", version = kotlinVersion))
}
}

allprojects {
repositories {
google()
Expand All @@ -22,4 +8,4 @@ allprojects {

task<Delete>("clean") {
delete(rootProject.buildDir)
}
}
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ tasks.withType<KotlinCompile>().all {
repositories {
google()
mavenCentral()
}
}
45 changes: 22 additions & 23 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import org.gradle.kotlin.dsl.DependencyHandlerScope

@Suppress("MemberVisibilityCanBePrivate")
sealed class Dependencies {

object Ktor : Dependencies() {
const val version = "2.1.3"
const val version = "2.2.1"

const val ktorClientCore = "io.ktor:ktor-client-core:$version"
const val ktorClientOkHttp = "io.ktor:ktor-client-okhttp:$version"
Expand All @@ -27,7 +26,7 @@ sealed class Dependencies {

object KotlinX : Dependencies() {
const val datetimeVersion = "0.4.0"
const val serializationVersion = "1.3.3"
const val serializationVersion = "1.4.1"
const val immutableVersion = "0.3.5"

const val datetime = "org.jetbrains.kotlinx:kotlinx-datetime:$datetimeVersion"
Expand All @@ -44,7 +43,7 @@ sealed class Dependencies {
}

object AndroidxCore : Dependencies() {
const val version = "1.8.0"
const val version = "1.9.0"

const val core = "androidx.core:core:$version"
const val coreKtx = "androidx.core:core-ktx:$version"
Expand Down Expand Up @@ -92,19 +91,18 @@ sealed class Dependencies {
}

object Compose : Dependencies() {
const val version = "1.2.1"
const val compilerVersion = "1.3.0"
const val compilerVersion = "1.3.2"

const val activity = "androidx.activity:activity-compose:1.5.1"
const val animation = "androidx.compose.animation:animation:$version"
const val activity = "androidx.activity:activity-compose:1.6.1"
const val animation = "androidx.compose.animation:animation:1.3.2"
const val compiler = "androidx.compose.compiler:compiler:$compilerVersion"
const val foundation = "androidx.compose.foundation:foundation:$version"
const val material = "androidx.compose.material:material:$version"
const val material3 = "androidx.compose.material3:material3:1.0.0-alpha16"
const val runtime = "androidx.compose.runtime:runtime:$version"
const val ui = "androidx.compose.ui:ui:$version"
const val uiText = "androidx.compose.ui:ui-text:$version"
const val uiUtil = "androidx.compose.ui:ui-util:$version"
const val foundation = "androidx.compose.foundation:foundation:1.3.1"
const val material = "androidx.compose.material:material:1.3.1"
const val material3 = "androidx.compose.material3:material3:1.0.1"
const val runtime = "androidx.compose.runtime:runtime:1.3.2"
const val ui = "androidx.compose.ui:ui:1.3.2"
const val uiText = "androidx.compose.ui:ui-text:1.3.2"
const val uiUtil = "androidx.compose.ui:ui-util:1.3.2"

override fun invoke(scope: DependencyHandlerScope) {
scope {
Expand All @@ -122,7 +120,7 @@ sealed class Dependencies {
}

object Accompanist : Dependencies() {
const val version = "0.25.1"
const val version = "0.28.0"

const val systemUiController = "com.google.accompanist:accompanist-systemuicontroller:$version"
const val placeholder = "com.google.accompanist:accompanist-placeholder:$version"
Expand All @@ -148,7 +146,7 @@ sealed class Dependencies {
}

object Material : Dependencies() {
const val version = "1.5.0"
const val version = "1.7.0"

const val material = "com.google.android.material:material:$version"

Expand All @@ -160,7 +158,7 @@ sealed class Dependencies {
}

object Coil : Dependencies() {
const val version = "2.1.0"
const val version = "2.2.2"

const val coilBase = "io.coil-kt:coil:$version"
const val coilCompose = "io.coil-kt:coil-compose:$version"
Expand All @@ -174,7 +172,7 @@ sealed class Dependencies {
}

object AndroidxMedia3 : Dependencies() {
const val version = "1.0.0-beta02"
const val version = "1.0.0-beta03"

const val media3exo = "androidx.media3:media3-exoplayer:$version"
const val media3exoDash = "androidx.media3:media3-exoplayer-dash:$version"
Expand All @@ -190,6 +188,8 @@ sealed class Dependencies {
}

object Koin : Dependencies() {
// DO NOT UPGRADE
// it ships with androidx.navigation for no fucking reason
const val version = "3.2.0"

const val koin = "io.insert-koin:koin-android:$version"
Expand All @@ -204,7 +204,7 @@ sealed class Dependencies {
}

object HCaptcha : Dependencies() {
const val version = "3.3.5"
const val version = "3.3.6"

const val hCaptchaSdk = "com.github.hcaptcha:hcaptcha-android-sdk:$version"

Expand Down Expand Up @@ -243,15 +243,14 @@ sealed class Dependencies {
}
}

//TODO migrate to context receivers after upgrading to kotlin 1.6.20
// TODO: use context receivers when they are enabled by default
// cannot enable them for build.gradle.kts
abstract operator fun invoke(scope: DependencyHandlerScope)

//TODO migrate to context receivers after upgrading to kotlin 1.6.20
protected fun DependencyHandlerScope.implementation(dependencyNotation: String) {
"implementation"(dependencyNotation)
}

//TODO migrate to context receivers after upgrading to kotlin 1.6.20
protected fun DependencyHandlerScope.ksp(dependencyNotation: String) {
"ksp"(dependencyNotation)
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Aug 11 09:24:16 GET 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 4aa8cd2

Please sign in to comment.