@@ -4,8 +4,14 @@ buildscript {
4
4
}
5
5
}
6
6
7
+ plugins {
8
+ id " com.jfrog.bintray" version " 1.2"
9
+ }
10
+
7
11
apply plugin : ' java'
8
12
apply plugin : ' groovy'
13
+ apply plugin : ' maven-publish'
14
+ apply plugin : ' com.jfrog.bintray'
9
15
10
16
group = ' com.graphql-java'
11
17
version = ' 0.0.1-SNAPSHOT'
@@ -24,3 +30,86 @@ dependencies {
24
30
testCompile ' org.spockframework:spock-core:1.1-groovy-2.4'
25
31
testCompile ' org.codehaus.groovy:groovy-all:2.4.13'
26
32
}
33
+
34
+ task sourcesJar (type : Jar , dependsOn : classes) {
35
+ classifier = ' sources'
36
+ from sourceSets. main. allSource
37
+ }
38
+
39
+ task javadocJar (type : Jar , dependsOn : javadoc) {
40
+ classifier = ' javadoc'
41
+ from javadoc. destinationDir
42
+ }
43
+
44
+ artifacts {
45
+ archives sourcesJar
46
+ archives javadocJar
47
+ }
48
+
49
+ publishing {
50
+ publications {
51
+ maven(MavenPublication ) {
52
+ from components. java
53
+ groupId ' com.graphql-java'
54
+ artifactId ' graphql-java-extended-scalars'
55
+ version project. version
56
+
57
+ artifact sourcesJar
58
+ artifact javadocJar
59
+
60
+ pom. withXml {
61
+ asNode(). children(). last() + {
62
+ resolveStrategy = Closure . DELEGATE_FIRST
63
+ name ' graphql-java-extended-scalars'
64
+ description ' A library fo extended scalars for graphql-java'
65
+ url ' https://github.com/graphql-java/graphql-java-extended-scalars'
66
+ inceptionYear ' 2018'
67
+
68
+ scm {
69
+ url ' https://github.com/graphql-java/graphql-java-extended-scalars'
70
+ connection
' scm:[email protected] :graphql-java/graphql-java-extended-scalars.git'
71
+ developerConnection
' scm:[email protected] :graphql-java/graphql-java-extended-scalars.git'
72
+ }
73
+
74
+ licenses {
75
+ license {
76
+ name ' MIT'
77
+ url ' https://github.com/graphql-java/graphql-java/blob/master/LICENSE.md'
78
+ distribution ' repo'
79
+ }
80
+ }
81
+
82
+ developers {
83
+ developer {
84
+ id ' bbakerman'
85
+ name ' Brad Baker'
86
+
87
+ }
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ bintray {
96
+ user = System . getenv(' BINTRAY_USER' )
97
+ key = System . getenv(' BINTRAY_KEY' )
98
+ publications = [' maven' ]
99
+ publish = true
100
+ pkg {
101
+ userOrg = ' graphql-java'
102
+ repo = ' graphql-java'
103
+ name = " graphql-java-extended-scalars"
104
+ desc = ' A library fo extended scalars for graphql-java'
105
+ licenses = [' MIT' ]
106
+ vcsUrl = ' https://github.com/graphql-java/graphql-java-extended-scalars.git'
107
+ version {
108
+ released = new Date ()
109
+ vcsTag = project. version
110
+ gpg {
111
+ sign = true
112
+ }
113
+ }
114
+ }
115
+ }
0 commit comments