From 37030abdfad7d48996e73e12924739984185820e Mon Sep 17 00:00:00 2001 From: Sebastian Sellmair Date: Wed, 17 Jul 2024 17:25:36 +0200 Subject: [PATCH] Minor buildscript cleanup --- buildSrc/build.gradle.kts | 10 ++++++---- samples/joke-app/build.gradle.kts | 23 +++++++++++++---------- samples/login-screen/build.gradle.kts | 5 ++++- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 0139eac..cfa24a6 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -18,15 +18,17 @@ repositories { dependencies { implementation(gradleKotlinDsl()) + + /* JetBrains */ implementation(kotlin("gradle-plugin:${deps.versions.kotlin.get()}")) implementation("org.jetbrains.kotlin.plugin.compose:org.jetbrains.kotlin.plugin.compose.gradle.plugin:${deps.versions.kotlin.get()}") - implementation("com.android.tools.build:gradle:${deps.versions.androidGradlePlugin.get()}") implementation("org.jetbrains.compose:org.jetbrains.compose.gradle.plugin:${deps.versions.compose.get()}") - implementation("org.jetbrains.kotlinx.atomicfu:org.jetbrains.kotlinx.atomicfu.gradle.plugin:0.25.0") implementation("org.jetbrains.kotlinx.binary-compatibility-validator:org.jetbrains.kotlinx.binary-compatibility-validator.gradle.plugin:0.15.1") - implementation("com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin:0.29.0") implementation("org.jetbrains.kotlinx.benchmark:org.jetbrains.kotlinx.benchmark.gradle.plugin:${deps.versions.kotlinxBenchmark.get()}") + + implementation("com.android.tools.build:gradle:${deps.versions.androidGradlePlugin.get()}") + implementation("com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin:0.29.0") } gradlePlugin.plugins.create("evas") { @@ -37,4 +39,4 @@ gradlePlugin.plugins.create("evas") { gradlePlugin.plugins.create("evas-publish") { id = "evas-publish" implementationClass = "EvasPublishPlugin" -} \ No newline at end of file +} diff --git a/samples/joke-app/build.gradle.kts b/samples/joke-app/build.gradle.kts index f45de4a..25694a4 100644 --- a/samples/joke-app/build.gradle.kts +++ b/samples/joke-app/build.gradle.kts @@ -85,17 +85,20 @@ kotlin { /* Desktop Options */ compose.desktop.application { - mainClass = "io.sellmair.jokes.MainKt" + mainClass = "io.sellmair.jokes.JokesApplicationKt" +} + +kotlin.jvm().mainRun { + mainClass = "io.sellmair.jokes.JokesApplicationKt" } /* iOS options */ -kotlin { - targets.withType() - .matching { it.konanTarget.family == IOS } - .configureEach { - binaries.framework { - baseName = "JokesKt" - isStatic = true - } +kotlin.targets.withType() + .matching { it.konanTarget.family == IOS } + .configureEach { + binaries.framework { + baseName = "JokesKt" + isStatic = true } -} + } + diff --git a/samples/login-screen/build.gradle.kts b/samples/login-screen/build.gradle.kts index fe740fa..ca64d32 100644 --- a/samples/login-screen/build.gradle.kts +++ b/samples/login-screen/build.gradle.kts @@ -69,7 +69,6 @@ android { namespace = "io.sellmair.loginScreen" defaultConfig { minSdk = 24 - targetSdk = 34 applicationId = "io.sellmair.loginScreenSample" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -94,6 +93,10 @@ compose.desktop.application { mainClass = "io.sellmair.sample.SampleApplicationKt" } +kotlin.jvm().mainRun { + mainClass = "io.sellmair.sample.SampleApplicationKt" +} + /* iOS options */ kotlin { targets.withType()