[gradle-plugin] Support multiplatform projects in current DSL.

This commit is contained in:
Ilya Matveev
2018-02-02 17:26:50 +07:00
committed by ilmat192
parent 5df150dc14
commit 3eaf46ae60
6 changed files with 134 additions and 9 deletions
+10 -1
View File
@@ -76,6 +76,7 @@ configurations {
dependencies {
compile "org.jetbrains.kotlin:kotlin-native-shared:$konanVersion"
compile "org.jetbrains.kotlin:kotlin-stdlib:$buildKotlinVersion"
compile "org.jetbrains.kotlin:kotlin-gradle-plugin:$buildKotlinVersion"
compile gradleApi()
bundleDependencies "org.jetbrains.kotlin:kotlin-native-shared:$konanVersion"
@@ -119,15 +120,23 @@ processResources {
from(file("$rootBuildDirectory/utilities/env_blacklist"))
}
// TODO: Get rid of manual pom generation
publishing {
publications {
gradlePlugin(MavenPublication) {
artifact shadowJar
pom.withXml { XmlProvider xml ->
def stdlibDep = xml.asNode().appendNode("dependencies").appendNode("dependency")
def deps = xml.asNode().appendNode("dependencies")
def stdlibDep = deps.appendNode("dependency")
stdlibDep.appendNode("groupId", "org.jetbrains.kotlin")
stdlibDep.appendNode("artifactId", "kotlin-stdlib")
stdlibDep.appendNode("version", "$buildKotlinVersion")
def kotlinPluginDep = deps.appendNode("dependency")
kotlinPluginDep.appendNode("groupId", "org.jetbrains.kotlin")
kotlinPluginDep.appendNode("artifactId", "kotlin-gradle-plugin")
kotlinPluginDep.appendNode("version", "$buildKotlinVersion")
}
}
}