Skip to content

Commit

Permalink
Document bintray helper script and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Sep 20, 2018
1 parent 69071b3 commit 4ceb640
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
13 changes: 8 additions & 5 deletions gradle/bintray.gradle
@@ -1,17 +1,20 @@
/*
* Check usage information at: http://hexagonkt.com/build_helpers/bintray.html
*/

apply plugin: 'com.jfrog.bintray'

bintray {
key = findProperty ('bintrayKey') ?: System.getenv('BINTRAY_KEY') ?: 'anonymous'
user = findProperty ('bintrayUser') ?: System.getenv('BINTRAY_USER') ?: 'anonymous'
key = findProperty ('bintrayKey') ?: System.getenv('BINTRAY_KEY')
user = findProperty ('bintrayUser') ?: System.getenv('BINTRAY_USER')
publications = [ 'mavenJava' ]
publish = true

pkg {
repo = findProperty ('bintrayRepo')
repo = project.findProperty ('bintrayRepo')
name = project.name
licenses = [ findProperty ('license') ]
vcsUrl = findProperty ('vcsUrl')
licenses = [ project.findProperty ('license') ]
vcsUrl = project.findProperty ('vcsUrl')
}
}

Expand Down
29 changes: 29 additions & 0 deletions hexagon_site/pages/build_helpers/bintray.md
@@ -0,0 +1,29 @@

Bintray
=======

This script setup the project/module for publishing in [Bintray].

It publishes all artifacts attached to the `mavenJava` publication (check [kotlin.gradle] publishing
section) at the bare minimum binaries are published. For an Open Source project, you must include
sources and javadocs also.

To use it you should add `apply from: $gradleScripts/bintray.gradle` to your `build.gradle` script
and `id 'com.jfrog.bintray' version 'VERSION'` to your `plugins` section in the root `build.gradle`.

This helper settings are:

* bintrayKey : if not defined will try to load BINTRAY_KEY environment variable.
* bintrayUser : or BINTRAY_USER environment variable if not defined.
* bintrayRepo :
* license :
* vcsUrl :

To add variables to a build:

1. In `gradle.properties`
2. In `~/.gradle/gradle.properties`
3. Command line `-Pkey=val`
4. Inside `build.gradle`: `ext.key='val'`

For more reference, check the usage in `.travis.yaml` and `hexagon_*/build.gradle`
1 change: 0 additions & 1 deletion readme.md
Expand Up @@ -133,7 +133,6 @@ The code quality is checked by Codebeat:

[![codebeat badge]][codebeat page]

[JMeter]: http://jmeter.apache.org
[CoverageGrid]: https://codecov.io/gh/hexagonkt/hexagon/branch/master/graphs/icicle.svg
[Coverage]: https://codecov.io/gh/hexagonkt/hexagon
[codebeat badge]: https://codebeat.co/badges/f8fafe6f-767a-4248-bc34-e6d4a2acb971
Expand Down

0 comments on commit 4ceb640

Please sign in to comment.