Skip to content

Commit 048cddf

Browse files
committed
chore: update gradle build scripts and dependencies
This commit includes the following changes: - Updated instructions for running and hot-reloading the application. - Commented out Java toolchain configuration in `app/build.gradle.kts`. - Changed `moduleName` to `outputModuleName` in `wasmJs` configuration in `app/build.gradle.kts`. - Removed copyright header and Foojay toolchain resolver configuration from `settings.gradle.kts`. - Updated `composehot` version to `1.0.0-beta03` in `gradle/libs.versions.toml`. - Updated `compose-hot-gradlePlugin` module name in `gradle/libs.versions.toml`.
1 parent e8c73dd commit 048cddf

4 files changed

Lines changed: 31 additions & 45 deletions

File tree

app/build.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,20 @@ dependencies {
7878
googlePlayImplementation(libs.play.review)
7979
googlePlayImplementation(libs.play.review.kts)
8080
}
81-
java {
82-
toolchain {
83-
languageVersion = JavaLanguageVersion.of(21)
84-
vendor = JvmVendorSpec.JETBRAINS
85-
implementation = JvmImplementation.VENDOR_SPECIFIC
86-
}
87-
}
81+
//java {
82+
// toolchain {
83+
// languageVersion = JavaLanguageVersion.of(21)
84+
// vendor = JvmVendorSpec.JETBRAINS
85+
// implementation = JvmImplementation.VENDOR_SPECIFIC
86+
// }
87+
//}
8888
kotlin {
8989
androidTarget()
9090
jvm()
9191

9292
@OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
9393
wasmJs {
94-
moduleName = "composeApp"
94+
outputModuleName = "composeApp"
9595
browser {
9696
val rootDirPath = project.rootDir.path
9797
val projectDirPath = project.projectDir.path

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ compose-plugin = "1.9.0-alpha03"
6161
composeNavigation="2.9.0-beta02"
6262
androidxNavigationTest = "2.9.1" #for nav test
6363
compose = "1.8.3"
64-
composehot="1.0.0-beta01"
64+
composehot="1.0.0-beta03"
6565
foojay="0.10.0"
6666

6767
playGame = "21.0.0"
@@ -245,7 +245,7 @@ room-gradlePlugin = { group = "androidx.room", name = "room-gradle-plugin", vers
245245
kotlin-powerAssert = { module = "org.jetbrains.kotlin:kotlin-power-assert", version.ref = "kotlin" }
246246
screenShot-gradlePlugin = { module = "com.android.compose.screenshot:screenshot-test-gradle-plugin", version.ref = "screenshot" }
247247
kover-gradlePlugin = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "kover" }
248-
compose-hot-gradlePlugin = { module = "org.jetbrains.compose.hot-reload:gradle-plugin", version.ref = "composehot" }
248+
compose-hot-gradlePlugin = { module = "org.jetbrains.compose.hot-reload:hot-reload-gradle-plugin", version.ref = "composehot" }
249249
spotless-gradlePlugin = { group = "com.diffplug.spotless", name = "spotless-plugin-gradle", version.ref = "spotless" }
250250
jlleitschuh-gradlePlugin = { module = "org.jlleitschuh.gradle:ktlint-gradle", version.ref = "ktlint" }
251251
detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }

instuctions

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ export TOKEN="your_actual_token"
1818
conveyor make site
1919
./gradlew run
2020

21-
./gradlew jvmRunHot -PmainClass=com.mshdabiola.kotlinmultiplatformtemplate.MainAppKt
21+
./gradlew app:jvmRunHot -PmainClass=com.mshdabiola.kotlinmultiplatformtemplate.MainAppKt
2222
./gradlew app:jvmRun -PmainClass=com.mshdabiola.kotlinmultiplatformtemplate.MainAppKt
23+
Use `./gradlew reload` to hot reload the application
24+
| Use `./gradlew :app:hotReloadJvmMain` to hot reload the application (alternative)
25+
| Use `./gradlew :app:jvmRunHot --auto` to automatically reload the application on source changes
2326

2427
//./gradlew assembleDebug -PenableComposeCompilerReports=true
2528
// ./gradlew assembleDebug -PenableComposeCompilerMetrics=true
2629
./gradlew build-logic:convention:spotlessApply
2730
https://randombits.dev/articles/android/fdroid
31+

settings.gradle.kts

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,27 @@
1-
/*
2-
* Copyright (C) 2025 AntsyLich and The Mihon Authors
3-
*
4-
* This program is free software: you can redistribute it and/or modify
5-
* it under the terms of the GNU Affero General Public License as published
6-
* by the Free Software Foundation, version 3.
7-
*
8-
* This program is distributed in the hope that it will be useful,
9-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11-
* GNU Affero General Public License for more details.
12-
*
13-
* You should have received a copy of the GNU Affero General Public License
14-
* along with this program. If not, see <https://www.gnu.org/licenses/>.
15-
*
16-
* SPDX-License-Identifier: AGPL-3.0-only
17-
*/
1+
182
pluginManagement {
193
repositories {
204
includeBuild("build-logic")
21-
// maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
225
google()
236
mavenCentral()
247
gradlePluginPortal()
258
}
269
}
27-
28-
// settings.gradle.kts
29-
plugins {
30-
id("org.gradle.toolchains.foojay-resolver") version "1.0.0"
31-
}
32-
33-
toolchainManagement {
34-
jvm {
35-
javaRepositories {
36-
repository("foojay") {
37-
resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
38-
}
39-
}
40-
}
41-
}
10+
//
11+
//// settings.gradle.kts
12+
//plugins {
13+
// id("org.gradle.toolchains.foojay-resolver") version "1.0.0"
14+
//}
15+
//
16+
//toolchainManagement {
17+
// jvm {
18+
// javaRepositories {
19+
// repository("foojay") {
20+
// resolverClass.set(org.gradle.toolchains.foojay.FoojayToolchainResolver::class.java)
21+
// }
22+
// }
23+
// }
24+
//}
4225

4326
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
4427

@@ -72,5 +55,4 @@ include(":app")
7255
include(":features:main")
7356
include(":features:detail")
7457
include(":features:setting")
75-
// include(":lint")
7658
include(":ktlint")

0 commit comments

Comments
 (0)