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
|
- 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)
|
### [Config.xcconfig](app/iosApp/Configuration/Config.xcconfig)
|
||||||
- Change `PRODUCT_NAME` and `PRODUCT_BUNDLE_IDENTIFIER` to your projects name
|
- Change `PRODUCT_NAME` and `PRODUCT_BUNDLE_IDENTIFIER` to your projects name
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinMultiplatform)
|
|
||||||
alias(libs.plugins.androidApplication)
|
alias(libs.plugins.androidApplication)
|
||||||
alias(libs.plugins.composeMultiplatform)
|
alias(libs.plugins.composeMultiplatform)
|
||||||
alias(libs.plugins.composeCompiler)
|
alias(libs.plugins.composeCompiler)
|
||||||
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
androidTarget {
|
androidTarget {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
jvmTarget.set(JvmTarget.JVM_11)
|
jvmTarget.set(JvmTarget.JVM_17)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,13 +46,13 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "dev.carlosmartino.triplogic"
|
namespace = "dev.carlosmartino.template"
|
||||||
compileSdk = libs.versions.android.compileSdk
|
compileSdk = libs.versions.android.compileSdk
|
||||||
.get()
|
.get()
|
||||||
.toInt()
|
.toInt()
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "dev.carlosmartino.triplogic"
|
applicationId = "dev.carlosmartino.template"
|
||||||
minSdk = libs.versions.android.minSdk
|
minSdk = libs.versions.android.minSdk
|
||||||
.get()
|
.get()
|
||||||
.toInt()
|
.toInt()
|
||||||
@@ -73,8 +73,8 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import dev.carlosmartino.plugins.libs
|
|||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.kotlin.dsl.configure
|
import org.gradle.kotlin.dsl.configure
|
||||||
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
import org.gradle.kotlin.dsl.getByType
|
import org.gradle.kotlin.dsl.getByType
|
||||||
import org.jetbrains.compose.ComposeExtension
|
import org.jetbrains.compose.ComposeExtension
|
||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||||
@@ -18,6 +19,12 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
|||||||
|
|
||||||
extensions.configure<KotlinMultiplatformExtension> {
|
extensions.configure<KotlinMultiplatformExtension> {
|
||||||
sourceSets.apply {
|
sourceSets.apply {
|
||||||
|
androidMain {
|
||||||
|
dependencies {
|
||||||
|
implementation(composeDeps.preview)
|
||||||
|
implementation(libs.findLibrary("libs.androidx.activity.compose").get())
|
||||||
|
}
|
||||||
|
}
|
||||||
commonMain {
|
commonMain {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(composeDeps.runtime)
|
implementation(composeDeps.runtime)
|
||||||
@@ -28,9 +35,13 @@ class ComposeMultiplatformConventionPlugin : Plugin<Project> {
|
|||||||
implementation(composeDeps.animation)
|
implementation(composeDeps.animation)
|
||||||
implementation(composeDeps.animationGraphics)
|
implementation(composeDeps.animationGraphics)
|
||||||
implementation(composeDeps.components.resources)
|
implementation(composeDeps.components.resources)
|
||||||
|
implementation(composeDeps.components.uiToolingPreview)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ internal fun Project.configureKotlinAndroid(
|
|||||||
extension: LibraryExtension,
|
extension: LibraryExtension,
|
||||||
) = extension.apply {
|
) = extension.apply {
|
||||||
val moduleName = path.split(":").drop(2).joinToString(".")
|
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
|
compileSdk = libs
|
||||||
.findVersion("android.compileSdk")
|
.findVersion("android.compileSdk")
|
||||||
|
|||||||
Reference in New Issue
Block a user