Skip to content

Commit 110b523

Browse files
committed
Prepare for user project
1 parent 33372fc commit 110b523

File tree

8 files changed

+28
-2855
lines changed

8 files changed

+28
-2855
lines changed

build.gradle.kts

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ plugins {
44
alias(libs.plugins.jetbrainsCompose) apply false
55
alias(libs.plugins.androidApplication) apply false
66
alias(libs.plugins.androidLibrary) apply false
7-
alias(libs.plugins.kotlinMultiplatform) apply false
7+
kotlin("multiplatform") apply false
8+
kotlin("plugin.compose") apply false
89
}

composeApp/build.gradle.kts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
22
import org.jetbrains.compose.ExperimentalComposeLibrary
3+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
34
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
45
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
6+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
57

68
plugins {
7-
alias(libs.plugins.kotlinMultiplatform)
9+
kotlin("multiplatform")
810
alias(libs.plugins.androidApplication)
911
alias(libs.plugins.jetbrainsCompose)
12+
kotlin("plugin.compose")
1013
}
1114

1215
kotlin {

composeApp/src/commonMain/kotlin/App.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import androidx.compose.runtime.remember
1212
import androidx.compose.runtime.setValue
1313
import androidx.compose.ui.Alignment
1414
import androidx.compose.ui.Modifier
15+
import compose_example.composeapp.generated.resources.Res
16+
import compose_example.composeapp.generated.resources.compose_multiplatform
1517
import org.jetbrains.compose.resources.ExperimentalResourceApi
1618
import org.jetbrains.compose.resources.painterResource
1719

@@ -30,7 +32,7 @@ fun App() {
3032
}
3133
AnimatedVisibility(showImage) {
3234
Image(
33-
painterResource("compose-multiplatform.xml"),
35+
painterResource(Res.drawable.compose_multiplatform),
3436
null
3537
)
3638
}

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ kotlin.mpp.androidSourceSetLayoutVersion=2
1616
kotlin.mpp.enableCInteropCommonization=true
1717

1818
#Development
19-
development=true
19+
development=true
20+
21+
kotlin_version=2.0.0-RC3

gradle/libs.versions.toml

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[versions]
22
compose = "1.5.4"
3-
compose-plugin = "1.6.0-alpha01"
4-
compose-compiler = "1.5.4"
3+
compose-plugin = "1.6.10-rc03"
54
agp = "8.1.4"
65
android-minSdk = "24"
76
android-compileSdk = "34"
@@ -13,12 +12,9 @@ androidx-material = "1.10.0"
1312
androidx-constraintlayout = "2.1.4"
1413
androidx-test-junit = "1.1.5"
1514
androidx-espresso-core = "3.5.1"
16-
kotlin = "1.9.21"
1715
junit = "4.13.2"
1816

1917
[libraries]
20-
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
21-
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
2218
junit = { group = "junit", name = "junit", version.ref = "junit" }
2319
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
2420
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
@@ -36,5 +32,4 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
3632
[plugins]
3733
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
3834
androidApplication = { id = "com.android.application", version.ref = "agp" }
39-
androidLibrary = { id = "com.android.library", version.ref = "agp" }
40-
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
35+
androidLibrary = { id = "com.android.library", version.ref = "agp" }

kotlin-js-store/yarn.lock

-2,844
This file was deleted.

settings.gradle.kts

+14
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,31 @@ rootProject.name = "compose-example"
22
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
33

44
pluginManagement {
5+
val kotlin_repo_url: String? by settings
6+
val kotlin_version: String? by settings
7+
58
repositories {
69
google()
710
gradlePluginPortal()
811
mavenCentral()
12+
13+
kotlin_repo_url?.also { maven(it) }
14+
}
15+
16+
plugins {
17+
kotlin("multiplatform") version kotlin_version
18+
kotlin("plugin.compose") version kotlin_version
919
}
1020
}
1121

1222
dependencyResolutionManagement {
23+
val kotlin_repo_url: String? by settings
24+
1325
repositories {
1426
google()
1527
mavenCentral()
28+
29+
kotlin_repo_url?.also { maven(it) }
1630
}
1731
}
1832

0 commit comments

Comments
 (0)