Skip to content

Commit

Permalink
Prepare for user project
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgonmic committed May 17, 2024
1 parent 33372fc commit 110b523
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 2,855 deletions.
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ plugins {
alias(libs.plugins.jetbrainsCompose) apply false
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.kotlinMultiplatform) apply false
kotlin("multiplatform") apply false
kotlin("plugin.compose") apply false
}
5 changes: 4 additions & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.compose.ExperimentalComposeLibrary
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
alias(libs.plugins.kotlinMultiplatform)
kotlin("multiplatform")
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsCompose)
kotlin("plugin.compose")
}

kotlin {
Expand Down
4 changes: 3 additions & 1 deletion composeApp/src/commonMain/kotlin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import compose_example.composeapp.generated.resources.Res
import compose_example.composeapp.generated.resources.compose_multiplatform
import org.jetbrains.compose.resources.ExperimentalResourceApi
import org.jetbrains.compose.resources.painterResource

Expand All @@ -30,7 +32,7 @@ fun App() {
}
AnimatedVisibility(showImage) {
Image(
painterResource("compose-multiplatform.xml"),
painterResource(Res.drawable.compose_multiplatform),
null
)
}
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ kotlin.mpp.androidSourceSetLayoutVersion=2
kotlin.mpp.enableCInteropCommonization=true

#Development
development=true
development=true

kotlin_version=2.0.0-RC3
9 changes: 2 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[versions]
compose = "1.5.4"
compose-plugin = "1.6.0-alpha01"
compose-compiler = "1.5.4"
compose-plugin = "1.6.10-rc03"
agp = "8.1.4"
android-minSdk = "24"
android-compileSdk = "34"
Expand All @@ -13,12 +12,9 @@ androidx-material = "1.10.0"
androidx-constraintlayout = "2.1.4"
androidx-test-junit = "1.1.5"
androidx-espresso-core = "3.5.1"
kotlin = "1.9.21"
junit = "4.13.2"

[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
Expand All @@ -36,5 +32,4 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
[plugins]
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
2,844 changes: 0 additions & 2,844 deletions kotlin-js-store/yarn.lock

This file was deleted.

14 changes: 14 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@ rootProject.name = "compose-example"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

pluginManagement {
val kotlin_repo_url: String? by settings
val kotlin_version: String? by settings

repositories {
google()
gradlePluginPortal()
mavenCentral()

kotlin_repo_url?.also { maven(it) }
}

plugins {
kotlin("multiplatform") version kotlin_version
kotlin("plugin.compose") version kotlin_version
}
}

dependencyResolutionManagement {
val kotlin_repo_url: String? by settings

repositories {
google()
mavenCentral()

kotlin_repo_url?.also { maven(it) }
}
}

Expand Down

0 comments on commit 110b523

Please sign in to comment.