Build: Extract publication for dependencies to publishing.gradle.kts
This commit is contained in:
+3
-28
@@ -94,32 +94,7 @@ val dxArtifact = artifacts.add("default", unzipDxJar.outputs.files.singleFile) {
|
|||||||
builtBy(unzipDxJar)
|
builtBy(unzipDxJar)
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts.add("default", prepareDxSourcesJar)
|
artifacts.add("archives", dxArtifact)
|
||||||
|
artifacts.add("archives", prepareDxSourcesJar)
|
||||||
|
|
||||||
publishing {
|
apply(from="../publishing.gradle.kts")
|
||||||
publications {
|
|
||||||
create<MavenPublication>("maven") {
|
|
||||||
artifact(dxArtifact)
|
|
||||||
artifact(prepareDxSourcesJar)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
url = uri("${rootProject.buildDir}/internal/repo")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bintray {
|
|
||||||
user = extra["bintray.user"] as String
|
|
||||||
key = extra["bintray.key"] as String
|
|
||||||
|
|
||||||
setPublications("maven")
|
|
||||||
|
|
||||||
pkg.apply {
|
|
||||||
repo = "kotlin-dependencies"
|
|
||||||
name = project.name
|
|
||||||
userOrg = "kotlin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Vendored
+43
@@ -0,0 +1,43 @@
|
|||||||
|
import com.jfrog.bintray.gradle.BintrayExtension
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
maven("https://plugins.gradle.org/m2")
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(plugin = "maven-publish")
|
||||||
|
apply(plugin = "com.jfrog.bintray")
|
||||||
|
|
||||||
|
val archives by configurations
|
||||||
|
|
||||||
|
configure<PublishingExtension> {
|
||||||
|
publications {
|
||||||
|
create<MavenPublication>("maven") {
|
||||||
|
setArtifacts(archives.artifacts)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url = uri("${rootProject.buildDir}/internal/repo")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<BintrayExtension> {
|
||||||
|
user = extra["bintray.user"] as String
|
||||||
|
key = extra["bintray.apikey"] as String
|
||||||
|
|
||||||
|
setPublications("maven")
|
||||||
|
|
||||||
|
pkg.apply {
|
||||||
|
repo = "kotlin-dependencies"
|
||||||
|
name = project.name
|
||||||
|
userOrg = "kotlin"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user