Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to kotlin 2.1 #576

Merged
merged 6 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ kotlin.native.cacheKind=none
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.androidGradlePluginCompatibility.nowarn=true
org.jetbrains.compose.experimental.macos.enabled=true

dev.dimension.flare.linux=false
kotlin.native.toolchain.enabled=false

systemProp.javax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
systemProp.javax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
systemProp.javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
systemProp.javax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ lifecycleViewmodelCompose = "2.8.4"
minSdk = "24"
java = "21"
agp = "8.7.2"
kotlin = "2.0.21"
kotlin = "2.1.0"
core-ktx = "1.15.0"
junit = "4.13.2"
androidx-test-ext-junit = "1.2.1"
espresso-core = "3.6.1"
lifecycle-runtime-ktx = "2.8.7"
activity-compose = "1.9.3"
compose-bom = "2024.11.00"
ksp = "2.0.21-1.0.28"
ksp = "2.1.0-1.0.29"
paging = "3.3.4"
navigation = "2.8.4"
kotlinx-datetime = "0.6.1"
Expand All @@ -32,7 +32,7 @@ ktlintPlugin = "12.1.2"
apng-android = "3.0.2"
ktlint = "1.3.1"
okio = "3.9.1"
skie = "0.9.3"
skie = "0.9.5"
ksoup = "0.2.0"
versionUpdate = "0.51.0"
bluesky = "0.3.0-SNAPSHOT"
Expand Down
5 changes: 4 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ dependencyResolutionManagement {

rootProject.name = "Flare"
include(":app")
include(":linuxApp")
val enableLinux = providers.gradleProperty("dev.dimension.flare.linux").orNull == "true"
if (enableLinux) {
include(":linuxApp")
}
include(":shared")
include(":shared:ui")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
18 changes: 11 additions & 7 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ plugins {
alias(libs.plugins.room)
}

val enableLinux = providers.gradleProperty("dev.dimension.flare.linux").orNull == "true"
kotlin {
applyDefaultHierarchyTemplate()

Expand All @@ -26,11 +27,12 @@ kotlin {
).forEach { appleTarget ->
appleTarget.binaries.framework {
baseName = "shared"
isStatic = true
embedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.DISABLE)
// isStatic = true
}
}
linuxX64()
if (enableLinux) {
linuxX64()
}
targets.forEach { target ->
target.name.takeIf {
it != "metadata"
Expand Down Expand Up @@ -93,9 +95,11 @@ kotlin {
implementation(libs.stately.iso.collections)
}
}
val linuxMain by getting {
dependencies {
implementation(libs.ktor.client.curl)
if (enableLinux) {
val linuxMain by getting {
dependencies {
implementation(libs.ktor.client.curl)
}
}
}
}
Expand Down Expand Up @@ -146,4 +150,4 @@ afterEvaluate {
val runKtlintCheckOverCommonMainSourceSet by tasks
runKtlintFormatOverCommonMainSourceSet.dependsOn("kspCommonMainKotlinMetadata")
runKtlintCheckOverCommonMainSourceSet.dependsOn("kspCommonMainKotlinMetadata")
}
}
3 changes: 1 addition & 2 deletions shared/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ kotlin {
).forEach { appleTarget ->
appleTarget.binaries.framework {
baseName = "sharedUI"
isStatic = true
embedBitcode(org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode.DISABLE)
// isStatic = true
}
}

Expand Down