Skip to content

Commit

Permalink
Merge pull request #41 from syxc/kotlin-2.0
Browse files Browse the repository at this point in the history
Update gradle build config
  • Loading branch information
syxc authored Jun 29, 2024
2 parents 1d31ddb + 09fbe4d commit 0bee45e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
21 changes: 15 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
org.gradle.jvmargs=-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
org.gradle.configuration-cache=true

# Kotlin
kotlin.code.style=official
kotlin.incremental.native=true
#kotlin.js.compiler=ir

Expand All @@ -16,30 +14,41 @@ kotlin.native.cacheKind=none

# https://github.com/Kotlin/kotlinx-atomicfu/issues/141
kotlin.native.ignoreIncorrectDependencies=true
kotlin.native.ignoreDisabledTargets=true

# MPP
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true

# https://kotl.in/issue
kotlin.apple.xcodeCompatibility.nowarn=true

# Compose
#org.jetbrains.compose.experimental.wasm.enabled=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

# Android
android.useAndroidX=true
android.enableJetifier=true
android.nonTransitiveRClass=true
android.debug.obsoleteApi=true

# https://developer.android.com/build/releases/gradle-plugin?hl=zh-cn
# Turn on Precise resource shrinking
android.enableNewResourceShrinker.preciseShrinking=true
# Run 'aapt optimize' on resources to minimize their APK size impact.
android.enableResourceOptimizations=true

# Disable build features that are enabled by default,
# https://developer.android.com/build/releases/gradle-plugin#default-changes
android.defaults.buildfeatures.resvalues=false
android.defaults.buildfeatures.shaders=false

# moko-resources
moko.resources.disableStaticFrameworkWarning=false

# Tell the KMP plugin where the iOS project lives
xcodeproj=./iosApp

# development mode
development=false
30 changes: 16 additions & 14 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ androidx-core-ktx = "1.13.1"
androidx-material = "1.12.0"

jbr-compose = "1.6.11"
androidx-compose = "1.6.6"
compose-material3 = "1.2.1"

androidx-espresso-core = "3.5.1"
androidx-test-junit = "1.1.5"
androidx-espresso-core = "3.6.1"
androidx-test-junit = "1.2.1"
junit = "4.13.2"

[libraries]
Expand All @@ -27,21 +25,25 @@ androidx-material = { group = "com.google.android.material", name = "material",
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }

# JetBrains Compose: https://github.com/JetBrains/compose-multiplatform
jetbrains-compose-compiler = "org.jetbrains.compose.compiler:compiler:1.5.14"
jetbrains-compose-gradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jbr-compose" }
jetbrains-compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jbr-compose" }
jetbrains-compose-runtime-saveable = { module = "org.jetbrains.compose.runtime:runtime-saveable", version.ref = "jbr-compose" }
jetbrains-compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "jbr-compose" }
# JetBrains Compose
# https://github.com/JetBrains/compose-multiplatform
#jetbrains-compose-compiler = "org.jetbrains.compose.compiler:compiler:1.5.14"
#jetbrains-compose-gradlePlugin = { module = "org.jetbrains.compose:compose-gradle-plugin", version.ref = "jbr-compose" }
#jetbrains-compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "jbr-compose" }
#jetbrains-compose-runtime-saveable = { module = "org.jetbrains.compose.runtime:runtime-saveable", version.ref = "jbr-compose" }
#jetbrains-compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "jbr-compose" }

jetbrains-compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "jbr-compose" }
jetbrains-compose-ui-tooling = { module = "org.jetbrains.compose.ui:ui-tooling", version.ref = "jbr-compose" }
jetbrains-compose-ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "jbr-compose" }
jetbrains-compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "jbr-compose" }
jetbrains-compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "jbr-compose" }
jetbrains-compose-animation = { module = "org.jetbrains.compose.animation:animation-core", version.ref = "jbr-compose" }
jetbrains-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "jbr-compose" }

# Redwood: https://github.com/cashapp/redwood
#jetbrains-compose-material = { module = "org.jetbrains.compose.material:material", version.ref = "jbr-compose" }
#jetbrains-compose-animation = { module = "org.jetbrains.compose.animation:animation-core", version.ref = "jbr-compose" }
#jetbrains-components-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "jbr-compose" }

# Redwood
# https://github.com/cashapp/redwood
redwood-gradle-plugin = { module = "app.cash.redwood:redwood-gradle-plugin", version.ref = "redwood" }
redwood-compose = { module = "app.cash.redwood:redwood-compose", version.ref = "redwood" }
redwood-composeui = { module = "app.cash.redwood:redwood-composeui", version.ref = "redwood" }
Expand Down

0 comments on commit 0bee45e

Please sign in to comment.