Skip to content

Commit

Permalink
feat: update compose, agp, kotlin
Browse files Browse the repository at this point in the history
Also optimizes and fixes build warnings
  • Loading branch information
rushiiMachine committed Feb 12, 2023
1 parent 032c7c4 commit d5519db
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 20 deletions.
15 changes: 11 additions & 4 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:Suppress("UnstableApiUsage")

plugins {
id("com.android.application")
id("com.google.devtools.ksp")
Expand All @@ -11,14 +13,13 @@ android {

defaultConfig {
applicationId = "com.xinto.opencord"
namespace = "com.xinto.opencord"
minSdk = 21
targetSdk = 33
versionCode = 1
versionName = "0.0.1"

vectorDrawables {
useSupportLibrary = true
}
multiDexEnabled = true

buildConfigField("int", "DISCORD_VERSION_CODE", "126021")
buildConfigField("String", "DISCORD_VERSION_NAME", "\"126.21 - Stable\"")
Expand Down Expand Up @@ -117,14 +118,20 @@ android {
}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

dependencies {
implementation(project(":bottom-dialog-compose"))
implementation(project(":overlapping-panels-compose"))
implementation(project(":simpleast-compose"))

// 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.2.0")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.2")

Dependencies.Koin(this)
Dependencies.Ktor(this)
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xinto.opencord">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
3 changes: 3 additions & 0 deletions bottom-dialog-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:Suppress("UnstableApiUsage")

plugins {
id("com.android.library")
kotlin("android")
}

android {
namespace = "com.xinto.bottomdialogcompose"
compileSdk = 32

defaultConfig {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion bottom-dialog-compose/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.xinto.bdc" />
<manifest />
12 changes: 6 additions & 6 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ sealed class Dependencies {
}

object Compose : Dependencies() {
const val compilerVersion = "1.3.2"
const val compilerVersion = "1.4.2"

const val activity = "androidx.activity:activity-compose:1.6.1"
const val animation = "androidx.compose.animation:animation:1.3.2"
const val animation = "androidx.compose.animation:animation:1.3.3"
const val compiler = "androidx.compose.compiler:compiler:$compilerVersion"
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"
const val runtime = "androidx.compose.runtime:runtime:1.3.3"
const val ui = "androidx.compose.ui:ui:1.3.3"
const val uiText = "androidx.compose.ui:ui-text:1.3.3"
const val uiUtil = "androidx.compose.ui:ui-util:1.3.3"

override fun invoke(scope: DependencyHandlerScope) {
scope {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx3072m -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
Expand All @@ -13,7 +13,7 @@ org.gradle.parallel=true
android.useAndroidX=true

# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
android.enableJetifier=false

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
Expand Down
3 changes: 3 additions & 0 deletions overlapping-panels-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:Suppress("UnstableApiUsage")

plugins {
id("com.android.library")
kotlin("android")
}

android {
namespace = "com.xinto.panels"
compileSdk = 32

defaultConfig {
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion overlapping-panels-compose/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.xinto.opc"/>
<manifest />
6 changes: 3 additions & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
pluginManagement {
plugins {
val agpVersion = "7.3.1"
val agpVersion = "7.4.1"
id("com.android.application") version agpVersion apply false
id("com.android.library") version agpVersion apply false

val kotlinVersion = "1.7.20"
val kotlinVersion = "1.8.10"
kotlin("android") version kotlinVersion apply false
kotlin("plugin.parcelize") version kotlinVersion apply false
kotlin("plugin.serialization") version kotlinVersion apply false
kotlin("gradle-plugin") version kotlinVersion apply false

val kspVersion = "1.7.20-1.0.7"
val kspVersion = "1.8.10-1.0.9"
id("com.google.devtools.ksp") version kspVersion apply false
}
repositories {
Expand Down
3 changes: 3 additions & 0 deletions simpleast-compose/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
@file:Suppress("UnstableApiUsage")

plugins {
id("com.android.library")
kotlin("android")
}

android {
namespace = "com.xinto.simpleast"
compileSdk = 32

defaultConfig {
Expand Down
2 changes: 1 addition & 1 deletion simpleast-compose/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.xinto.simpleast" />
<manifest />

0 comments on commit d5519db

Please sign in to comment.