From 0fa7aadfd11d4e8d36dec5f4ef24891fabc9ef1f Mon Sep 17 00:00:00 2001
From: Cedric Beust
- Before you can upload, you need to create a file Bintray / JCenter
local.properties
in the root directory of your project with the following keys:
+ You upload files to Bintray with the uploadBintray
task. Before you can upload, you need to create a file local.properties
in the root directory of your project with the following keys:
@@ -489,25 +489,37 @@ you are ready to do your first upload.
- You define what to upload with the bintray
directive:
+ The simplest way to define what files will be uploaded is to use mavenJars{}
, which will upload all the artifacts necessary for your project to be usable by Maven compatible build tools:
+ assemble { + mavenJars {} + } --bintray { - publish = true - file("${kobalt.buildDirectory}/libs/${kobalt.name}-${kobalt.version}.zip", - "${kobalt.name}/${kobalt.version}/${kobalt.name}-${kobalt.version}.zip") -} --- If all you want is upload your project in Maven form, just add the following to the
-assemble
section of your build file: -- mavenJars {} + bintray {}This directive is described here and is a shortcut to upload all the files that are required in a Maven repo (jar file, javadocs, source files and POM file). You can take a look at this build file for a full example of how to package and publish a project to Bintray / JCenter.
++ You can also specify the files to upload individually with the
+ +file
directive. The following + build file uploads a zip file to a bintray directory defined by the version number of your project: ++bintray { + file("${kobalt.buildDirectory}/libs/${kobalt.name}-${kobalt.version}.zip", + "${kobalt.name}/${kobalt.version}/${kobalt.name}-${kobalt.version}.zip") +} ++ ++$ ./kobaltw uploadBintray +... +========== kobalt-line-count:uploadBintray + kobalt-line-count: Found 2 artifacts to upload + All artifacts successfully uploaded +The
bintray
directive accepts the following parameters: @@ -522,14 +534,6 @@ bintray {
-$ ./kobaltw uploadBintray -... -========== kobalt-line-count:uploadBintray - kobalt-line-count: Found 2 artifacts to upload - All artifacts successfully uploaded --