build fix
This commit is contained in:
parent
7daeedb9ff
commit
1344471f40
@ -11,6 +11,7 @@ allprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
apply(plugin = "dokka-publish")
|
||||||
if (name.startsWith("dataforge")) {
|
if (name.startsWith("dataforge")) {
|
||||||
apply(plugin = "npm-publish")
|
apply(plugin = "npm-publish")
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
import org.jetbrains.dokka.gradle.DokkaTask
|
import org.jetbrains.dokka.gradle.DokkaTask
|
||||||
|
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformJvmPlugin
|
||||||
|
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMultiplatformPlugin
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
|
||||||
id("org.jetbrains.dokka")
|
id("org.jetbrains.dokka")
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
plugins.withType(KotlinMultiplatformPlugin::class){
|
||||||
|
configure<KotlinMultiplatformExtension>{
|
||||||
val dokka by tasks.getting(DokkaTask::class) {
|
val dokka by tasks.getting(DokkaTask::class) {
|
||||||
outputFormat = "html"
|
outputFormat = "html"
|
||||||
outputDirectory = "$buildDir/javadoc"
|
outputDirectory = "$buildDir/javadoc"
|
||||||
@ -32,22 +34,13 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val javadocJar by tasks.registering(Jar::class) {
|
val javadocJar by tasks.registering(Jar::class) {
|
||||||
|
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||||
dependsOn(dokka)
|
dependsOn(dokka)
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
from("$buildDir/javadoc")
|
from("$buildDir/javadoc")
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
configure<PublishingExtension>{
|
||||||
|
|
||||||
// publications.filterIsInstance<MavenPublication>().forEach { publication ->
|
|
||||||
// if (publication.name == "kotlinMultiplatform") {
|
|
||||||
// // for our root metadata publication, set artifactId with a package and project name
|
|
||||||
// publication.artifactId = project.name
|
|
||||||
// } else {
|
|
||||||
// // for targets, set artifactId with a package, project name and target name (e.g. iosX64)
|
|
||||||
// publication.artifactId = "${project.name}-${publication.name}"
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
targets.all {
|
targets.all {
|
||||||
val publication = publications.findByName(name) as MavenPublication
|
val publication = publications.findByName(name) as MavenPublication
|
||||||
@ -56,4 +49,26 @@ kotlin {
|
|||||||
publication.artifact(javadocJar.get())
|
publication.artifact(javadocJar.get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins.withType(KotlinPlatformJvmPlugin::class){
|
||||||
|
val dokka by tasks.getting(DokkaTask::class) {
|
||||||
|
outputFormat = "html"
|
||||||
|
outputDirectory = "$buildDir/javadoc"
|
||||||
|
jdkVersion = 8
|
||||||
|
}
|
||||||
|
|
||||||
|
val javadocJar by tasks.registering(Jar::class) {
|
||||||
|
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||||
|
dependsOn(dokka)
|
||||||
|
archiveClassifier.set("javadoc")
|
||||||
|
from("$buildDir/javadoc")
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<PublishingExtension>{
|
||||||
|
publications.filterIsInstance<MavenPublication>().forEach {publication ->
|
||||||
|
publication.artifact(javadocJar.get())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,4 +1,7 @@
|
|||||||
import org.gradle.kotlin.dsl.*
|
import org.gradle.kotlin.dsl.`maven-publish`
|
||||||
|
import org.gradle.kotlin.dsl.apply
|
||||||
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
import org.gradle.kotlin.dsl.kotlin
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform")
|
kotlin("multiplatform")
|
||||||
@ -74,8 +77,6 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(plugin = "dokka-publish")
|
|
||||||
|
|
||||||
// Apply JS test configuration
|
// Apply JS test configuration
|
||||||
val runJsTests by ext(false)
|
val runJsTests by ext(false)
|
||||||
|
|
||||||
|
@ -18,17 +18,18 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val vcs = "https://github.com/altavir/dataforge-core"
|
val vcs = "https://github.com/altavir/dataforge-core"
|
||||||
|
val bintrayRepo = "https://bintray.com/mipt-npm/dataforge"
|
||||||
|
|
||||||
// Configure publishing
|
// Configure publishing
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven("https://bintray.com/mipt-npm/dataforge")
|
maven(bintrayRepo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process each publication we have in this project
|
// Process each publication we have in this project
|
||||||
publications.filterIsInstance<MavenPublication>().forEach { publication ->
|
publications.filterIsInstance<MavenPublication>().forEach { publication ->
|
||||||
|
|
||||||
// use type safe pom config GSL insterad of old dynamic
|
// use type safe pom config GSL instead of old dynamic
|
||||||
publication.pom {
|
publication.pom {
|
||||||
name.set(project.name)
|
name.set(project.name)
|
||||||
description.set(project.description)
|
description.set(project.description)
|
||||||
@ -70,7 +71,7 @@ bintray {
|
|||||||
userOrg = "mipt-npm"
|
userOrg = "mipt-npm"
|
||||||
repo = "dataforge"
|
repo = "dataforge"
|
||||||
name = project.name
|
name = project.name
|
||||||
issueTrackerUrl = "https://github.com/altavir/dataforge-core/issues"
|
issueTrackerUrl = "$vcs/issues"
|
||||||
setLicenses("Apache-2.0")
|
setLicenses("Apache-2.0")
|
||||||
vcsUrl = vcs
|
vcsUrl = vcs
|
||||||
version.apply {
|
version.apply {
|
||||||
@ -80,6 +81,7 @@ bintray {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//workaround bintray bug
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
setPublications(*publishing.publications.names.toTypedArray())
|
setPublications(*publishing.publications.names.toTypedArray())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user