-
Notifications
You must be signed in to change notification settings - Fork 129
/
publish.gradle
66 lines (59 loc) · 1.95 KB
/
publish.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def versionString = file('src/main/resources/cognitivej-version.txt').text.trim()
group = 'cognitivej'
version = versionString
// 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
javadoc.failOnError = false
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
task release() {
dependsOn 'assemble'
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
// todo: setup release to maven central
//bintray {
// user = project.hasProperty('bintray_user') ? bintray_user : ''
// key = project.hasProperty('bintray_api_key') ? bintray_api_key : ''
// publications = ['mavenJava']
// dryRun = false
// publish = true
// pkg {
// repo = 'CognitiveJ'
// name = 'CognitiveJ'
// desc = 'Image Analysis in Java Made Easy'
// websiteUrl = 'https://github.com/CognitiveJ/cognitivej'
// issueTrackerUrl = 'https://github.com/CognitiveJ/cognitivej/issues'
// vcsUrl = 'https://github.com/CognitiveJ/cognitivej.git'
// licenses = ['Apache-2.0']
// labels = ['cognitivej', 'java', 'Image Analysis', 'microsoft cognitive']
// publicDownloadNumbers = true
// //Optional version descriptor
// version {
// name = project.version
// released = new Date()
// 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'
// }
// }
// }
//}