Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (114 sloc) 3.1 KB
plugins {
id "java-library"
id "maven-publish"
id "com.jfrog.bintray" version "1.8.4"
}
group = "com.github.davidb"
def description = "A reporter for metrics which announces measurements to an InfluxDB server."
version = "git describe --always --dirty".execute().text.trim()
println("version : '${version}'")
repositories {
jcenter()
}
dependencies {
implementation 'io.dropwizard.metrics:metrics-core:4.1.0'
implementation 'org.slf4j:slf4j-api:1.7.26'
testImplementation 'junit:junit:4.12'
testImplementation 'org.testng:testng:6.14.3'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.easytesting:fest-assert-core:2.0M10'
testImplementation 'org.mockito:mockito-all:1.10.19'
testImplementation 'com.google.guava:guava:23.0'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.26'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
test {
// enable TestNG support (default is JUnit)
useTestNG()
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier = 'javadoc'
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
def pomConfig = {
name project.name
url "https://github.com/davidB/${project.name}"
inceptionYear "2016"
licenses {
license {
name "Public domain (CC0-1.0)"
url "http://creativecommons.org/publicdomain/zero/1.0/"
distribution "repo"
}
}
scm {
connection "scm:git:git://github.com/davidB/${project.name}.git"
developerConnection "scm:git:git@github.com:davidB/${project.name}.git"
url "https://github.com/davidB/${project.name}/"
}
developers {
developer {
id "davidB"
name "David Bernard"
}
developer {
id "McFoggy"
name "Matthieu Brouillard"
email "matthieu@brouillard.fr"
}
}
}
publishing {
publications {
mavenStuff(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', description)
root.children().last() + pomConfig
}
}
}
}
bintray {
user = bintray_user
key = bintray_api_key
publications = ['mavenStuff'] //When uploading Maven-based publication files
//dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'maven'
name = project.name
desc = description
websiteUrl = "https://github.com/davidB/${project.name}"
issueTrackerUrl = "https://github.com/davidB/${project.name}/issues"
vcsUrl = "https://github.com/davidB/${project.name}.git"
licenses = ['CC0-1.0']
publicDownloadNumbers = true
version {
name = project.version
vcsTag = project.version
//attributes = []
//gpg {
// sign = true //Determines whether to GPG sign the files. The default is false
// passphrase = 'optional, the passphrase for GPG signing'
//}
}
}
}
bintrayUpload.dependsOn(check, assemble)
bintrayUpload.onlyIf {
bintray_api_key.trim().length() > 0
}
You can’t perform that action at this time.