Remove unnecessary convention plugins
This commit is contained in:
@@ -4,15 +4,7 @@ plugins {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly(libs.plugins.kotlinMultiplatform.asDependency())
|
compileOnly(libs.plugins.kotlinMultiplatform.asDependency())
|
||||||
compileOnly(libs.plugins.androidApplication.asDependency())
|
|
||||||
compileOnly(libs.plugins.composeMultiplatform.asDependency())
|
|
||||||
compileOnly(libs.plugins.composeCompiler.asDependency())
|
|
||||||
compileOnly(libs.plugins.composeHotReload.asDependency())
|
|
||||||
compileOnly(libs.plugins.kotlinJvm.asDependency())
|
|
||||||
compileOnly(libs.plugins.kotlinSerialization.asDependency())
|
|
||||||
compileOnly(libs.plugins.ktor.asDependency())
|
|
||||||
compileOnly(libs.plugins.spotless.asDependency())
|
compileOnly(libs.plugins.spotless.asDependency())
|
||||||
compileOnly(libs.plugins.flywayPlugin.asDependency())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Provider<PluginDependency>.asDependency(): Provider<String> =
|
fun Provider<PluginDependency>.asDependency(): Provider<String> =
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("com.android.application")
|
|
||||||
}
|
|
||||||
|
|
||||||
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace = "dev.ulfrx.recipe"
|
|
||||||
compileSdk = libs.findVersion("android-compileSdk").get().toString().toInt()
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId = "dev.ulfrx.recipe"
|
|
||||||
minSdk = libs.findVersion("android-minSdk").get().toString().toInt()
|
|
||||||
targetSdk = libs.findVersion("android-targetSdk").get().toString().toInt()
|
|
||||||
versionCode = 1
|
|
||||||
versionName = "1.0"
|
|
||||||
}
|
|
||||||
packaging {
|
|
||||||
resources {
|
|
||||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
buildTypes {
|
|
||||||
getByName("release") {
|
|
||||||
isMinifyEnabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("recipe.kotlin.multiplatform")
|
|
||||||
id("org.jetbrains.compose")
|
|
||||||
id("org.jetbrains.kotlin.plugin.compose")
|
|
||||||
id("org.jetbrains.compose.hot-reload")
|
|
||||||
}
|
|
||||||
|
|
||||||
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
sourceSets {
|
|
||||||
commonMain.dependencies {
|
|
||||||
implementation(libs.findLibrary("compose-runtime").get())
|
|
||||||
implementation(libs.findLibrary("compose-foundation").get())
|
|
||||||
implementation(libs.findLibrary("compose-material3").get())
|
|
||||||
implementation(libs.findLibrary("compose-ui").get())
|
|
||||||
implementation(libs.findLibrary("compose-components-resources").get())
|
|
||||||
implementation(libs.findLibrary("androidx-lifecycle-viewmodelCompose").get())
|
|
||||||
implementation(libs.findLibrary("androidx-lifecycle-runtimeCompose").get())
|
|
||||||
implementation(libs.findLibrary("koin-compose").get())
|
|
||||||
implementation(libs.findLibrary("koin-composeViewmodel").get())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
|
||||||
import org.gradle.kotlin.dsl.getByType
|
|
||||||
|
|
||||||
plugins {
|
|
||||||
id("org.jetbrains.kotlin.jvm")
|
|
||||||
id("org.jetbrains.kotlin.plugin.serialization")
|
|
||||||
id("io.ktor.plugin")
|
|
||||||
id("org.flywaydb.flyway")
|
|
||||||
application
|
|
||||||
}
|
|
||||||
|
|
||||||
val libs = extensions.getByType<VersionCatalogsExtension>().named("libs")
|
|
||||||
|
|
||||||
kotlin {
|
|
||||||
jvmToolchain(21)
|
|
||||||
compilerOptions {
|
|
||||||
allWarningsAsErrors.set(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
"implementation"(libs.findLibrary("ktor-serverCore").get())
|
|
||||||
"implementation"(libs.findLibrary("ktor-serverNetty").get())
|
|
||||||
"implementation"(libs.findLibrary("ktor-serverContentNegotiation").get())
|
|
||||||
"implementation"(libs.findLibrary("ktor-serializationKotlinxJson").get())
|
|
||||||
"implementation"(libs.findLibrary("logback").get())
|
|
||||||
"implementation"(libs.findLibrary("flyway-core").get())
|
|
||||||
"implementation"(libs.findLibrary("flyway-database-postgresql").get())
|
|
||||||
"implementation"(libs.findLibrary("postgresql").get())
|
|
||||||
"testImplementation"(libs.findLibrary("ktor-serverTestHost").get())
|
|
||||||
"testImplementation"(libs.findLibrary("kotlin-testJunit").get())
|
|
||||||
}
|
|
||||||
|
|
||||||
flyway {
|
|
||||||
url = System.getenv("DATABASE_URL") ?: "jdbc:postgresql://localhost:5432/recipe"
|
|
||||||
user = System.getenv("DATABASE_USER") ?: "recipe"
|
|
||||||
password = System.getenv("DATABASE_PASSWORD") ?: "recipe"
|
|
||||||
locations = arrayOf("classpath:db/migration")
|
|
||||||
cleanDisabled = true
|
|
||||||
baselineOnMigrate = true
|
|
||||||
validateOnMigrate = true
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
// build-logic/src/main/kotlin/recipe.kotlin.multiplatform.gradle.kts
|
// Establishes the D-05 target matrix + JVM toolchain + warning policy.
|
||||||
// Establishes the D-05 target matrix + JVM toolchain + common deps.
|
|
||||||
// Android bytecode is JVM 11 (D-08); server + desktop + shared/jvm are JVM 21.
|
// Android bytecode is JVM 11 (D-08); server + desktop + shared/jvm are JVM 21.
|
||||||
|
//
|
||||||
|
// This plugin is intentionally dependency-free: shared/ must stay light
|
||||||
|
// (no Koin, no Kermit), and composeApp adds those in its own build file.
|
||||||
|
|
||||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
import org.gradle.api.artifacts.VersionCatalogsExtension
|
||||||
import org.gradle.kotlin.dsl.getByType
|
import org.gradle.kotlin.dsl.getByType
|
||||||
@@ -22,12 +24,8 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listOf(iosArm64(), iosSimulatorArm64()).forEach { iosTarget ->
|
iosArm64()
|
||||||
iosTarget.binaries.framework {
|
iosSimulatorArm64()
|
||||||
baseName = "ComposeApp"
|
|
||||||
isStatic = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
jvm {
|
jvm {
|
||||||
compilerOptions {
|
compilerOptions {
|
||||||
@@ -43,11 +41,6 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain.dependencies {
|
|
||||||
implementation(project.dependencies.platform(libs.findLibrary("koin-bom").get()))
|
|
||||||
implementation(libs.findLibrary("koin-core").get())
|
|
||||||
implementation(libs.findLibrary("kermit").get())
|
|
||||||
}
|
|
||||||
commonTest.dependencies {
|
commonTest.dependencies {
|
||||||
implementation(libs.findLibrary("kotlin-test").get())
|
implementation(libs.findLibrary("kotlin-test").get())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,72 @@
|
|||||||
plugins {
|
plugins {
|
||||||
// AGP must apply BEFORE recipe.kotlin.multiplatform — the latter calls androidTarget(),
|
// AGP must apply before recipe.kotlin.multiplatform — the latter calls androidTarget(),
|
||||||
// which requires the Android Gradle Plugin to already be on the project. Gradle applies
|
// which requires the Android Gradle Plugin to already be on the project.
|
||||||
// plugin IDs in declaration order, so recipe.android.application is listed first.
|
alias(libs.plugins.androidApplication)
|
||||||
id("recipe.android.application")
|
|
||||||
id("recipe.kotlin.multiplatform")
|
id("recipe.kotlin.multiplatform")
|
||||||
id("recipe.compose.multiplatform")
|
alias(libs.plugins.composeMultiplatform)
|
||||||
|
alias(libs.plugins.composeCompiler)
|
||||||
|
alias(libs.plugins.composeHotReload)
|
||||||
id("recipe.quality")
|
id("recipe.quality")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "dev.ulfrx.recipe"
|
||||||
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "dev.ulfrx.recipe"
|
||||||
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
|
targetSdk = libs.versions.android.targetSdk.get().toInt()
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
}
|
||||||
|
packaging {
|
||||||
|
resources {
|
||||||
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buildTypes {
|
||||||
|
getByName("release") {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
// Create the iOS framework Swift imports as `ComposeApp`.
|
||||||
|
listOf(iosArm64(), iosSimulatorArm64()).forEach { iosTarget ->
|
||||||
|
iosTarget.binaries.framework {
|
||||||
|
baseName = "ComposeApp"
|
||||||
|
isStatic = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
commonMain.dependencies {
|
||||||
|
implementation(project.dependencies.platform(libs.koin.bom))
|
||||||
|
implementation(libs.koin.core)
|
||||||
|
implementation(libs.koin.compose)
|
||||||
|
implementation(libs.koin.composeViewmodel)
|
||||||
|
implementation(libs.kermit)
|
||||||
|
implementation(libs.compose.runtime)
|
||||||
|
implementation(libs.compose.foundation)
|
||||||
|
implementation(libs.compose.material3)
|
||||||
|
implementation(libs.compose.ui)
|
||||||
|
implementation(libs.compose.components.resources)
|
||||||
|
implementation(libs.compose.uiToolingPreview)
|
||||||
|
implementation(libs.androidx.lifecycle.viewmodelCompose)
|
||||||
|
implementation(libs.androidx.lifecycle.runtimeCompose)
|
||||||
|
implementation(projects.shared)
|
||||||
|
}
|
||||||
androidMain.dependencies {
|
androidMain.dependencies {
|
||||||
implementation(libs.compose.uiToolingPreview)
|
implementation(libs.compose.uiToolingPreview)
|
||||||
implementation(libs.androidx.activity.compose)
|
implementation(libs.androidx.activity.compose)
|
||||||
implementation(libs.koin.android)
|
implementation(libs.koin.android)
|
||||||
}
|
}
|
||||||
commonMain.dependencies {
|
|
||||||
implementation(libs.compose.uiToolingPreview)
|
|
||||||
implementation(projects.shared)
|
|
||||||
}
|
|
||||||
jvmMain.dependencies {
|
jvmMain.dependencies {
|
||||||
implementation(compose.desktop.currentOs)
|
implementation(compose.desktop.currentOs)
|
||||||
implementation(libs.kotlinx.coroutinesSwing)
|
implementation(libs.kotlinx.coroutinesSwing)
|
||||||
|
|||||||
@@ -1,11 +1,22 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("recipe.jvm.server")
|
alias(libs.plugins.kotlinJvm)
|
||||||
|
alias(libs.plugins.kotlinSerialization)
|
||||||
|
alias(libs.plugins.ktor)
|
||||||
|
alias(libs.plugins.flywayPlugin)
|
||||||
|
application
|
||||||
id("recipe.quality")
|
id("recipe.quality")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "dev.ulfrx.recipe"
|
group = "dev.ulfrx.recipe"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(21)
|
||||||
|
compilerOptions {
|
||||||
|
allWarningsAsErrors.set(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
application {
|
application {
|
||||||
mainClass.set("dev.ulfrx.recipe.ApplicationKt")
|
mainClass.set("dev.ulfrx.recipe.ApplicationKt")
|
||||||
|
|
||||||
@@ -14,5 +25,25 @@ application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation(libs.ktor.serverCore)
|
||||||
|
implementation(libs.ktor.serverNetty)
|
||||||
|
implementation(libs.ktor.serverContentNegotiation)
|
||||||
|
implementation(libs.ktor.serializationKotlinxJson)
|
||||||
|
implementation(libs.logback)
|
||||||
|
implementation(libs.flyway.core)
|
||||||
|
implementation(libs.flyway.database.postgresql)
|
||||||
|
implementation(libs.postgresql)
|
||||||
implementation(projects.shared)
|
implementation(projects.shared)
|
||||||
|
testImplementation(libs.ktor.serverTestHost)
|
||||||
|
testImplementation(libs.kotlin.testJunit)
|
||||||
|
}
|
||||||
|
|
||||||
|
flyway {
|
||||||
|
url = System.getenv("DATABASE_URL") ?: "jdbc:postgresql://localhost:5432/recipe"
|
||||||
|
user = System.getenv("DATABASE_USER") ?: "recipe"
|
||||||
|
password = System.getenv("DATABASE_PASSWORD") ?: "recipe"
|
||||||
|
locations = arrayOf("classpath:db/migration")
|
||||||
|
cleanDisabled = true
|
||||||
|
baselineOnMigrate = true
|
||||||
|
validateOnMigrate = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
// AGP must apply BEFORE recipe.kotlin.multiplatform — the latter calls androidTarget(),
|
// AGP must apply BEFORE recipe.kotlin.multiplatform — the latter calls androidTarget(),
|
||||||
// which requires the Android Gradle Plugin to already be on the project. Gradle applies
|
// which requires the Android Gradle Plugin to already be on the project.
|
||||||
// plugin IDs in declaration order, so com.android.library is listed first.
|
|
||||||
alias(libs.plugins.androidLibrary)
|
alias(libs.plugins.androidLibrary)
|
||||||
id("recipe.kotlin.multiplatform")
|
id("recipe.kotlin.multiplatform")
|
||||||
id("recipe.quality")
|
id("recipe.quality")
|
||||||
@@ -10,36 +9,26 @@ plugins {
|
|||||||
kotlin {
|
kotlin {
|
||||||
explicitApi()
|
explicitApi()
|
||||||
|
|
||||||
// Override framework baseName: shared exposes "Shared.framework" to Swift, while
|
// No iOS framework here — composeApp's umbrella `ComposeApp.framework`
|
||||||
// composeApp's convention-plugin default is "ComposeApp.framework". (D-07 / PITFALL #10)
|
// transitively exports shared. Producing a second framework would double-bundle
|
||||||
targets.withType<org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget>().configureEach {
|
// the Kotlin stdlib at link time (PITFALL: duplicate-framework collision).
|
||||||
binaries.withType<org.jetbrains.kotlin.gradle.plugin.mpp.Framework>().configureEach {
|
|
||||||
baseName = "Shared"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
commonMain.dependencies {
|
commonMain.dependencies {
|
||||||
// Phase 1: intentionally empty. Domain models + DTOs land Phase 2+.
|
// Phase 1: intentionally empty. Domain models + DTOs land Phase 2+.
|
||||||
// D-19 / INFRA-06: Do NOT add Ktor, Compose, or SQLDelight deps here — EVER.
|
// D-19 / INFRA-06: No Ktor, Compose, SQLDelight, Koin, or Kermit here — EVER.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "dev.ulfrx.recipe.shared"
|
namespace = "dev.ulfrx.recipe.shared"
|
||||||
compileSdk =
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
libs.versions.android.compileSdk
|
|
||||||
.get()
|
|
||||||
.toInt()
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_11
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk =
|
minSdk = libs.versions.android.minSdk.get().toInt()
|
||||||
libs.versions.android.minSdk
|
|
||||||
.get()
|
|
||||||
.toInt()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user