Igor Demin
3 years ago
committed by
GitHub
25 changed files with 505 additions and 438 deletions
@ -1,21 +0,0 @@
|
||||
import org.jetbrains.compose.compose |
||||
|
||||
plugins { |
||||
kotlin("multiplatform") |
||||
id("org.jetbrains.compose") |
||||
} |
||||
|
||||
kotlin { |
||||
jvm { |
||||
withJava() |
||||
} |
||||
sourceSets { |
||||
named("jvmMain") { |
||||
dependencies { |
||||
implementation(compose.desktop.currentOs) |
||||
implementation(project("common")) |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,21 +0,0 @@
|
||||
import org.jetbrains.compose.compose |
||||
|
||||
plugins { |
||||
kotlin("multiplatform") |
||||
id("org.jetbrains.compose") |
||||
} |
||||
|
||||
kotlin { |
||||
jvm { |
||||
withJava() |
||||
} |
||||
sourceSets { |
||||
named("jvmMain") { |
||||
dependencies { |
||||
implementation(compose.desktop.currentOs) |
||||
implementation(project("common")) |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
@ -0,0 +1,11 @@
|
||||
plugins { |
||||
`kotlin-dsl` |
||||
} |
||||
|
||||
repositories { |
||||
gradlePluginPortal() |
||||
} |
||||
|
||||
dependencies { |
||||
compileOnly(gradleApi()) |
||||
} |
@ -0,0 +1,5 @@
|
||||
pluginManagement { |
||||
repositories { |
||||
gradlePluginPortal() |
||||
} |
||||
} |
@ -0,0 +1,32 @@
|
||||
import org.gradle.api.Project |
||||
import org.gradle.api.publish.PublishingExtension |
||||
import org.gradle.api.publish.maven.MavenPublication |
||||
import org.gradle.kotlin.dsl.configure |
||||
|
||||
fun Project.configureMavenPublication( |
||||
groupId: String, |
||||
artifactId: String, |
||||
name: String |
||||
) { |
||||
extensions.configure<PublishingExtension> { |
||||
publications { |
||||
all { |
||||
this as MavenPublication |
||||
|
||||
this.groupId = groupId |
||||
mppArtifactId = artifactId |
||||
|
||||
pom { |
||||
this.name.set(name) |
||||
url.set("https://github.com/JetBrains/compose-jb") |
||||
licenses { |
||||
license { |
||||
this.name.set("The Apache License, Version 2.0") |
||||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
/* |
||||
* Copyright 2020-2021 JetBrains s.r.o. and respective authors and developers. |
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. |
||||
*/ |
||||
|
||||
import org.gradle.api.Project |
||||
import org.gradle.api.publish.maven.MavenPublication |
||||
import java.lang.UnsupportedOperationException |
||||
|
||||
inline fun <reified T> Project.configureIfExists(fn: T.() -> Unit) { |
||||
extensions.findByType(T::class.java)?.fn() |
||||
} |
||||
|
||||
var MavenPublication.mppArtifactId: String |
||||
get() = throw UnsupportedOperationException() |
||||
set(value) { |
||||
val target = this.name |
||||
artifactId = if ("kotlinMultiplatform" in target) value else "$value-$target" |
||||
} |
@ -1,4 +1,4 @@
|
||||
include(":VideoPlayer:common") |
||||
include(":VideoPlayer:desktop") |
||||
include(":SplitPane:common") |
||||
include(":SplitPane:desktop") |
||||
include(":VideoPlayer:library") |
||||
include(":VideoPlayer:demo") |
||||
include(":SplitPane:library") |
||||
include(":SplitPane:demo") |
Loading…
Reference in new issue