Skip to content

Commit

Permalink
Merge pull request #16 from SEAbdulbasit/add-version-catalog
Browse files Browse the repository at this point in the history
Add version catalog
  • Loading branch information
SEAbdulbasit authored Sep 28, 2024
2 parents d2ce280 + 5ba311d commit b5abc55
Show file tree
Hide file tree
Showing 37 changed files with 238 additions and 513 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.DS_Store
build/
/captures
/.kotlin
.externalNativeBuild
.cxx
iosApp/Podfile.lock
Expand Down
9 changes: 5 additions & 4 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
kotlin("multiplatform")
id("com.android.application")
id("org.jetbrains.compose")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.application)
// alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose)
}

kotlin {
Expand Down Expand Up @@ -36,5 +37,5 @@ android {
}
}
dependencies {
implementation("androidx.window:window:1.3.0")
implementation(libs.androidx.window)
}
7 changes: 4 additions & 3 deletions automotiveApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
kotlin("multiplatform")
id("com.android.application")
id("org.jetbrains.compose")
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.android.application)
// alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose)
}

kotlin {
Expand Down
19 changes: 4 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import org.jetbrains.compose.ComposeExtension

plugins {
// this is necessary to avoid the plugins to be loaded multiple times
// in each subproject's classloader
kotlin("multiplatform").apply(false)
id("com.android.application").apply(false)
id("com.android.library").apply(false)
id("org.jetbrains.compose").apply(false)
alias(libs.plugins.kotlin.multiplatform).apply(false)
alias(libs.plugins.android.application).apply(false)
alias(libs.plugins.android.library).apply(false)
alias(libs.plugins.compose).apply(false)
}

allprojects {
Expand All @@ -18,13 +16,4 @@ allprojects {
maven("https://maven.pkg.jetbrains.space/kotlin/p/wasm/experimental")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/")
}

afterEvaluate {
extensions.findByType(ComposeExtension::class.java)?.apply {
val composeCompilerVersion = project.property("compose.compiler.version") as String
kotlinCompilerPlugin.set(composeCompilerVersion)
val kotlinVersion = project.property("kotlin.version") as String
kotlinCompilerPluginArgs.add("suppressKotlinVersionCompatibilityCheck=$kotlinVersion")
}
}
}
9 changes: 5 additions & 4 deletions desktopApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
kotlin("multiplatform")
id("org.jetbrains.compose")
alias(libs.plugins.kotlin.multiplatform)
// alias(libs.plugins.compose.compiler)
alias(libs.plugins.compose)
}

kotlin {
jvm()
sourceSets {
val jvmMain by getting {
val jvmMain by getting {
dependencies {
implementation(compose.desktop.currentOs)
implementation(project(":shared"))
Expand All @@ -23,7 +24,7 @@ compose.desktop {

nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "KotlinMultiplatformComposeDesktopApplication"
packageName = "RecipeApp-KMP"
packageVersion = "1.0.0"
}
}
Expand Down
24 changes: 24 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[versions]
appcompat = "1.7.0"
core-ktx = "1.13.1"
kotlin = "1.9.20"
#compose-plugin = "1.7.0-beta02"
compose-plugin = "1.7.0-beta02"
navigation-compose = "2.7.0-alpha07"
androidx-activity-compose = "1.9.2"
agp = "8.2.2"
window = "1.3.0"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity-compose" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "core-ktx" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-window = { module = "androidx.window:window", version.ref = "window" }
navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigation-compose" }

[plugins]
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
compose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Loading

0 comments on commit b5abc55

Please sign in to comment.