Last active
August 29, 2015 14:11
-
-
Save mslinn/daa579a1105b1eb518a9 to your computer and use it in GitHub Desktop.
Another failed attempt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0' | |
} | |
} | |
allprojects { | |
apply plugin: 'idea' | |
group = 'org.jfrog.example.bintray.gradle' | |
version = '1.2-gradle-publish' | |
} | |
subprojects { | |
apply plugin: 'java' | |
apply plugin: 'maven-publish' | |
apply plugin: 'com.jfrog.bintray' | |
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 | |
artifact javadocJar | |
} | |
} | |
} | |
bintray { | |
user = bintrayUser // from gradle.properties file in ~/.gradle | |
key = bintrayKey // from gradle.properties file in ~/.gradle | |
publications = ['mavenJava'] // 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 = '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'] | |
publicDownloadNumbers = true | |
//attributes= ['a': ['ay1', 'ay2'], 'b': ['bee'], c: 'cee'] //Optional package-level attributes | |
version { | |
name = project.version //Bintray logical version name | |
desc = 'Tagged HEAD' | |
vcsTag = project.version | |
// released = 'optional, date of the version release' //2 possible values: date in the format of 'yyyy-MM-dd'T'HH:mm:ss.SSSZZ' OR a java.util.Date instance | |
// attributes = ['gradle-plugin': 'com.use.less:com.use.less.gradle:gradle-useless-plugin'] //Optional version-level attributes | |
// gpg { | |
// sign = true //Determines whether to GPG sign the files. The default is false | |
// passphrase = 'passphrase' //Optional. The passphrase for GPG signing' | |
// } | |
//mavenCentralSync { | |
// sync = false //Optional (true by default). Determines whether to sync the version to Maven Central. | |
// user = 'userToken' //OSS user token | |
// password = 'paasword' //OSS user password | |
// close = '1' //Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually. | |
//} | |
} | |
} | |
} | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.2.1' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gradle bintrayUpload | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Task 'bintrayUpload' not found in root project 'Java-WebSocket'. | |
* Try: | |
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. | |
BUILD FAILED | |
Total time: 3.107 secs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have a multi module build?
Why do you apply the plugins to
subprojects
?