Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexandrepiveteau/1548f0033fa5b6f7d532d49802393f06 to your computer and use it in GitHub Desktop.
Save alexandrepiveteau/1548f0033fa5b6f7d532d49802393f06 to your computer and use it in GitHub Desktop.
Multiplatform Gradle configuration
plugins {
kotlin(Plugins.KotlinJvm)
kotlin(Plugins.KotlinSerialization)
id("org.jetbrains.compose") version "0.4.0"
}
repositories {
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
kotlin {
dependencies {
implementation(project(":shared"))
implementation(compose.desktop.currentOs)
// ...
}
}
compose.desktop {
application { mainClass = "io.github.alexandrepiveteau.echo.samples.drawing.Main" }
}
plugins { kotlin(Plugins.KotlinJs) }
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-js"))
implementation(project(":shared"))
// JS-specific dependencies
}
kotlin { js(IR) { browser { binaries.executable() } } }
plugins {
kotlin(Plugins.KotlinMultiplatform)
kotlin(Plugins.KotlinSerialization)
}
kotlin {
jvm {
compilations.all { kotlinOptions.jvmTarget = "1.8" }
testRuns["test"].executionTask.configure { useJUnit() }
withJava()
}
js(IR) { browser() }
sourceSets { /**/ }
}
buildscript {
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.Kotlin}")
classpath("org.jetbrains.kotlin:kotlin-serialization:${Versions.KotlinxSerialization}")
}
}
allprojects {
repositories {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/public/p/ktor/eap")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment