Skip to content

Commit 46bc438

Browse files
committed
Bump dependency versions
- Split module so that composeResources can be used
1 parent 4760225 commit 46bc438

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+238
-145
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Chantal Loncle
3+
Copyright (c) 2024 Chantal Loncle
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,15 @@ the size of the game grid and the amount of mines.
2727

2828
Clone the repository then pick an option:
2929

30-
- Open the project in IntelliJ IDEA and run `Main.kt`
31-
32-
- `./gradlew run` from an open terminal in the root of the project
33-
34-
- Open the Gradle toolbar and select `minesweeper/Tasks/compose desktop/run`
30+
- Open the project in IntelliJ IDEA and run `desktop/src/jvmMain/Main.kt` using gutter icon
3531

3632
## :microscope: Run tests
3733

3834
Clone the repository then pick an option:
3935

40-
- Open the project in IntelliJ IDEA then choose specific tests using gutter icons or right-click the `src/test` folder and
41-
select `Run 'Tests in 'minesweeper.test''`
36+
- Open the project in IntelliJ IDEA then choose specific tests using gutter icons or right-click the `desktop/src/jvmTest` folder and
37+
select `Run 'Tests in 'minesweeper.desktop.jvmTest''`
4238

43-
- `./gradlew test` from an open terminal in the root of the project
39+
- `./gradlew desktop:jvmTest` from an open terminal in the root of the project
4440

45-
- Open the Gradle toolbar and select `minesweeper/Tasks/verification/test`
41+
- Open the Gradle toolbar and select `minesweeper/Tasks/verification/jvmTest`

build.gradle.kts

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,16 @@
1-
import org.jetbrains.compose.compose
2-
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
3-
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
4-
51
plugins {
6-
kotlin("jvm") version "1.8.0"
7-
id("org.jetbrains.compose") version "1.4.0"
2+
kotlin("multiplatform") apply false
3+
id("org.jetbrains.compose") apply false
4+
id("org.jetbrains.kotlin.plugin.compose") apply false
85
}
96

107
group = "dev.bogwalk"
118
version = "1.0"
129

13-
repositories {
14-
google()
15-
mavenCentral()
16-
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
17-
}
18-
19-
dependencies {
20-
implementation(compose.desktop.currentOs)
21-
implementation(compose.material3)
22-
testImplementation(kotlin("test"))
23-
testImplementation(compose("org.jetbrains.compose.ui:ui-test-junit4"))
24-
}
25-
26-
tasks.withType<KotlinCompile> {
27-
kotlinOptions.jvmTarget = "11"
28-
}
29-
30-
compose.desktop {
31-
application {
32-
mainClass = "MainKt"
33-
nativeDistributions {
34-
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
35-
packageName = "minesweeper"
36-
packageVersion = "1.0.0"
37-
}
10+
allprojects {
11+
repositories {
12+
google()
13+
mavenCentral()
14+
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
3815
}
3916
}

common/build.gradle.kts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
plugins {
2+
kotlin("multiplatform")
3+
id("org.jetbrains.compose")
4+
id("org.jetbrains.kotlin.plugin.compose")
5+
}
6+
7+
group = "dev.bogwalk"
8+
version = "1.0"
9+
10+
kotlin {
11+
jvm("desktop") {
12+
compilations.all {
13+
kotlinOptions.jvmTarget = "17"
14+
}
15+
}
16+
sourceSets {
17+
val commonMain by getting {
18+
dependencies {
19+
implementation(compose.runtime)
20+
implementation(compose.components.resources)
21+
implementation(compose.material3)
22+
}
23+
}
24+
val desktopMain by getting {
25+
dependencies {
26+
implementation(compose.desktop.common)
27+
}
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)