forked from x2bool/kuery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bintray.gradle
79 lines (65 loc) · 2.13 KB
/
bintray.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
defaultTasks 'jar'
task sourcesJar(type: Jar, dependsOn: project.classes) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: project.javadoc) {
from javadoc.destinationDir
}
artifacts {
archives sourcesJar, javadocJar
}
def projDescription = 'Strongly typed alternative to plain text SQL. Powered by Kotlin.'
project.ext.set("bintray_repo", "")
if (file("${rootProject.projectDir}/maven.properties").exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream("${rootProject.projectDir}/maven.properties"))
properties.each { prop ->
project.ext.set(prop.key, prop.value)
}
}
publishing {
publications {
"${project.name}"(MavenPublication) {
pom.withXml {
asNode().appendNode('description', projDescription)
}
groupId rootProject.group_id
artifactId project.name
version rootProject.ext.version_name
artifact sourcesJar { classifier = 'sources' }
artifact javadocJar { classifier = 'javadoc' }
from components.java
}
}
repositories {
maven {
url "$bintray_repo"
}
maven {
url "https://jitpack.io"
}
}
}
bintray {
user = project.ext.properties.containsKey("bintray_user") ? project.ext.get("bintray_user") : System.getenv('BINTRAY_USER')
key = project.ext.properties.containsKey("bintray_apikey") ? project.ext.get("bintray_apikey") : System.getenv('BINTRAY_API_KEY')
publications = [project.name]
pkg {
repo = 'maven'
name = 'kuery'
userOrg = 'egram'
licenses = ['MIT']
vcsUrl = 'https://github.com/x2bool/kuery.git'
publish = true
publicDownloadNumbers = true
version {
name = rootProject.ext.version_name
desc = projDescription
released = new Date()
vcsTag = rootProject.ext.version_name
}
}
}
bintrayUpload.dependsOn "generatePomFileFor${project.name.capitalize()}Publication"