Skip to content

Commit

Permalink
implement bintray publish & release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hltj committed Jun 29, 2020
1 parent f71a66b commit 4c16935
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/out
/src/main/generated/
/src/test/generated_tests/
/gradle.properties
65 changes: 64 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import com.jfrog.bintray.gradle.BintrayExtension

plugins {
java
`maven-publish`
id("com.jfrog.bintray") version "1.8.5"
}

group = "me.hltj"
version = "1.0.0-SNAPSHOT"
version = "1.0.0"

repositories {
mavenCentral()
Expand All @@ -19,10 +23,69 @@ dependencies {
}

java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType<Javadoc> {
(options as CoreJavadocOptions).addStringOption("Xdoclint:none", "-quiet")
}

tasks.withType<Test> {
useJUnitPlatform()
}


publishing {
publications {
create<MavenPublication>("bintray") {
from(components["java"])
pom {
name.set("Vert.x Future Utils")
description.set("Convenient Utilities for Vert.x Future")
url.set("https://github.com/hltj/vertx-future-utils")
licenses {
license {
name.set("GNU Lesser General Public License")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
}
}
developers {
developer {
id.set("hltj")
name.set("JiaYanwei")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/hltj/vertx-future-utils.git")
}
}
}
}
}

bintray {
user = propertyOrEnv("bintray.user", "BINTRAY_USER")
key = propertyOrEnv("bintray.key", "BINTRAY_KEY")
setPublications("bintray")

with(pkg) {
repo = "mvn"
name = project.name
vcsUrl = "https://github.com/hltj/vertx-future-utils.git"
setLicenses("LGPL-3.0")
setLabels("vert.x", "future", "utilities", "utility-library")

with(version) {
val versionString = project.version.toString()
name = versionString
vcsTag = versionString
}
}
}

fun BintrayExtension.propertyOrEnv(propertyName: String, envName: String) =
project.properties[propertyName]?.toString() ?: System.getenv(envName)

0 comments on commit 4c16935

Please sign in to comment.