Initial commit
This commit is contained in:
@@ -5,8 +5,11 @@ After using this repo as a template you have to do the following changes so you
|
||||
- Change `rootProject.name` to your projects name
|
||||
|
||||
|
||||
## iOS
|
||||
## Android
|
||||
### [Build.gradle.kts](app/composeApp/build.gradle.kts)]
|
||||
- Change `namespace` and `applicationId` to your projects name
|
||||
|
||||
## iOS
|
||||
### [Config.xcconfig](app/iosApp/Configuration/Config.xcconfig)
|
||||
- Change `PRODUCT_NAME` and `PRODUCT_BUNDLE_IDENTIFIER` to your projects name
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
alias(libs.plugins.androidApplication)
|
||||
alias(libs.plugins.composeMultiplatform)
|
||||
alias(libs.plugins.composeCompiler)
|
||||
alias(libs.plugins.kotlinMultiplatform)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_11)
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,13 +46,13 @@ kotlin {
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "dev.carlosmartino.triplogic"
|
||||
namespace = "dev.carlosmartino.template"
|
||||
compileSdk = libs.versions.android.compileSdk
|
||||
.get()
|
||||
.toInt()
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "dev.carlosmartino.triplogic"
|
||||
applicationId = "dev.carlosmartino.template"
|
||||
minSdk = libs.versions.android.minSdk
|
||||
.get()
|
||||
.toInt()
|
||||
@@ -73,8 +73,8 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import dev.carlosmartino.plugins.libs
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.getByType
|
||||
import org.jetbrains.compose.ComposeExtension
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||
@@ -18,6 +19,12 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
||||
|
||||
extensions.configure<KotlinMultiplatformExtension> {
|
||||
sourceSets.apply {
|
||||
androidMain {
|
||||
dependencies {
|
||||
implementation(composeDeps.preview)
|
||||
implementation(libs.findLibrary("libs.androidx.activity.compose").get())
|
||||
}
|
||||
}
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation(composeDeps.runtime)
|
||||
@@ -28,9 +35,13 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
||||
implementation(composeDeps.animation)
|
||||
implementation(composeDeps.animationGraphics)
|
||||
implementation(composeDeps.components.resources)
|
||||
implementation(composeDeps.components.uiToolingPreview)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ internal fun Project.configureKotlinAndroid(
|
||||
extension: LibraryExtension,
|
||||
) = extension.apply {
|
||||
val moduleName = path.split(":").drop(2).joinToString(".")
|
||||
namespace = if (moduleName.isNotEmpty()) "dev.carlosmartino.platform.$moduleName" else "dev.carlosmartino.platform"
|
||||
namespace = if (moduleName.isNotEmpty()) "dev.carlosmartino.$moduleName" else "dev.carlosmartino.platform"
|
||||
|
||||
compileSdk = libs
|
||||
.findVersion("android.compileSdk")
|
||||
|
||||
Reference in New Issue
Block a user