Skip to content

Instantly share code, notes, and snippets.

@mslinn
Last active August 29, 2015 14:11
Show Gist options
  • Save mslinn/67e8094ab79624d40fd9 to your computer and use it in GitHub Desktop.
Save mslinn/67e8094ab79624d40fd9 to your computer and use it in GitHub Desktop.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
}
}
allprojects {
apply plugin: 'idea'
group = 'com.micronautics'
version = '1.3.1'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven'
}
subprojects {
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
testCompile 'junit:junit:4.7'
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
repositories {
jcenter()
}
publishing {
publications {
mavenJava(MavenPublication) {
if (plugins.hasPlugin('war')) {
from components.web
} else {
from components.java
}
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
bintray {
user = bintrayUser //this usually comes form gradle.properties file in ~/.gradle
key = bintrayKey //this usually comes form gradle.properties file in ~/.gradle
publications = ['mavenJava'] // see publications closure
pkg { //package will be created if does not exist
repo = 'Java-WebSocket'
userOrg = 'micronautics' // an optional organization name when the repo belongs to one of the user's orgs
name = 'Java-WebSocket'
desc = 'Publishing Java-WebSocket HEAD because that project seems abandoned'
websiteUrl = 'https://github.com/TooTallNate/Java-WebSocket'
issueTrackerUrl = 'https://github.com/TooTallNate/Java-WebSocket/issues'
vcsUrl = 'https://github.com/TooTallNate/Java-WebSocket.git'
licenses = ['MIT']
labels = ['WebSocket', 'Java']
}
}
}
//task wrapper(type: Wrapper) {
// gradleVersion = '2.2.1'
//}
$ gradle bintrayUpload
:bintrayUpload FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':bintrayUpload'.
> No value has been specified for property 'packageName'.
> No value has been specified for property 'user'.
> No value has been specified for property 'apiKey'.
> No value has been specified for property 'repoName'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment