@@ -4,8 +4,14 @@ buildscript {
44 }
55}
66
7+ plugins {
8+ id " com.jfrog.bintray" version " 1.2"
9+ }
10+
711apply plugin : ' java'
812apply plugin : ' groovy'
13+ apply plugin : ' maven-publish'
14+ apply plugin : ' com.jfrog.bintray'
915
1016group = ' com.graphql-java'
1117version = ' 0.0.1-SNAPSHOT'
@@ -24,3 +30,86 @@ dependencies {
2430 testCompile ' org.spockframework:spock-core:1.1-groovy-2.4'
2531 testCompile ' org.codehaus.groovy:groovy-all:2.4.13'
2632}
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:git@github.com:graphql-java/graphql-java-extended-scalars.git'
71+ developerConnection ' scm:git@github.com: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+ email ' bbakerman@gmail.com'
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