aboutsummaryrefslogtreecommitdiff
path: root/gradle
diff options
context:
space:
mode:
authorVsevolod Tolstopyatov <qwwdfsad@gmail.com>2018-12-13 12:39:45 +0300
committerGitHub <noreply@github.com>2018-12-13 12:39:45 +0300
commita5a7cdb86a10d6fcda61c2b9fc55963b86ca8947 (patch)
tree36d0720552cbea0ab51de4f90fa6cbcc74998060 /gradle
parentf64bcde03b4c5e46d63f19d5dcb3b1738c59eefa (diff)
parent3781a821a11a64670b5a3ffa3c276f1533332ad7 (diff)
downloadkotlinx.coroutines-a5a7cdb86a10d6fcda61c2b9fc55963b86ca8947.tar.gz
Merge pull request #876 from Kotlin/debug-agent
Coroutines debug agent Fixes #772
Diffstat (limited to 'gradle')
-rw-r--r--gradle/publish-bintray.gradle41
1 files changed, 22 insertions, 19 deletions
diff --git a/gradle/publish-bintray.gradle b/gradle/publish-bintray.gradle
index ffb43a27..23c38bd2 100644
--- a/gradle/publish-bintray.gradle
+++ b/gradle/publish-bintray.gradle
@@ -8,6 +8,7 @@ apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.jfrog.artifactory'
+apply plugin: "com.github.johnrengelman.shadow"
apply from: project.rootProject.file('gradle/maven-central.gradle')
@@ -16,13 +17,13 @@ def coroutines_core = platformLib("kotlinx-coroutines-core", platform)
// ------------- tasks
-def isNative = project.name.endsWith("native")
+def isNative() { return project.name.endsWith("native") }
def bUser = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
def bKey = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
task sourcesJar(type: Jar) {
classifier = 'sources'
- if (!isNative) {
+ if (!isNative()) {
from sourceSets.main.allSource
}
@@ -32,19 +33,15 @@ task sourcesJar(type: Jar) {
}
}
+
publishing {
repositories {
maven { url = 'https://kotlin.bintray.com/kotlinx' }
}
publications {
- maven(MavenPublication) {
- if (!isNative) {
- from components.java
- artifact javadocJar
- artifact sourcesJar
- }
- pom.withXml(configureMavenCentralMetadata)
+ maven(MavenPublication) { publication ->
+ preparePublication(publication)
}
}
}
@@ -58,15 +55,8 @@ artifactory {
password = bKey
}
- publications {
- maven(MavenPublication) {
- if (!isNative) {
- from components.java
- artifact javadocJar
- artifact sourcesJar
- }
- pom.withXml(configureMavenCentralMetadata)
- }
+ maven(MavenPublication) { publication ->
+ preparePublication(publication)
}
defaults {
@@ -75,6 +65,19 @@ artifactory {
}
}
+def preparePublication(MavenPublication publication) {
+ if (!isNative()) {
+ if (project.name == "kotlinx-coroutines-debug") {
+ project.shadow.component(publication)
+ } else {
+ publication.from components.java
+ }
+ publication.artifact javadocJar
+ publication.artifact sourcesJar
+ }
+ publication.pom.withXml(configureMavenCentralMetadata)
+}
+
task publishDevelopSnapshot() {
def branch = System.getenv('currentBranch')
if (branch == "develop") {
@@ -111,7 +114,7 @@ bintrayUpload.doFirst {
}
// TODO :kludge this is required to disable publish of metadata for all but native
-if (!isNative) {
+if (!isNative()) {
afterEvaluate {
publishing.publications.each { pub ->
pub.gradleModuleMetadataFile = null