Skip to content

Commit

Permalink
Fix bintray artifact names
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoann-Abbes committed Mar 11, 2021
1 parent cd30432 commit 27348a6
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.gradle.jvm.tasks.Jar
import java.time.LocalDateTime
import java.util.Date
import com.jfrog.bintray.gradle.BintrayPlugin
import com.jfrog.bintray.gradle.BintrayExtension
import org.gradle.api.publish.maven.MavenPom
Expand Down Expand Up @@ -90,12 +90,12 @@ application {
}

tasks.withType<Jar> {
archiveClassifier.set("without-dependencies")
archiveFileName.set("sdk-jvm-1.2.0-without-dependencies.jar")
}

tasks {
register("fatJar", Jar::class.java) {
archiveClassifier.set("")
archiveFileName.set("sdk-jvm-1.2.0.jar")
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes("Main-Class" to application.mainClassName)
Expand All @@ -111,13 +111,11 @@ tasks {

publishing {
publications {
create<MavenPublication>("kuzzle-sdk-jvm-fat") {
create<MavenPublication>("kuzzle-sdk-jvm-thin") {
groupId = artifactGroup
artifactId = artifactName
version = artifactVersion
version = "${artifactVersion}-without-dependencies"
from(components["java"])
artifact(tasks["fatJar"])

pom.withXml {
asNode().apply {
appendNode("description", pomDesc)
Expand All @@ -138,11 +136,11 @@ publishing {
}
}
}
create<MavenPublication>("kuzzle-sdk-jvm-thin") {
create<MavenPublication>("kuzzle-sdk-jvm-fat") {
groupId = artifactGroup
artifactId = artifactName
version = "${artifactVersion}-without-dependencies"
from(components["java"])
version = artifactVersion
artifact(tasks["fatJar"])

pom.withXml {
asNode().apply {
Expand Down Expand Up @@ -189,7 +187,7 @@ bintray {
version.apply {
name = artifactVersion
desc = pomDesc
// released = LocalDateTime.now().toString()
released = Date().toString()
vcsTag = artifactVersion
}
}
Expand Down

0 comments on commit 27348a6

Please sign in to comment.