@@ -4,8 +4,6 @@ buildscript {
44 mavenCentral()
55 }
66 dependencies {
7- classpath " io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
8- classpath ' com.bmuschko:gradle-nexus-plugin:2.3.1'
97 classpath ' biz.aQute.bnd:biz.aQute.bnd.gradle:3.1.0'
108 }
119}
@@ -21,30 +19,23 @@ apply plugin: 'idea'
2119apply plugin : ' osgi'
2220apply plugin : ' biz.aQute.bnd.builder'
2321apply plugin : ' com.jfrog.bintray'
24- apply plugin : ' maven'
2522apply plugin : ' maven-publish'
26- apply plugin : ' signing'
2723
28- apply plugin : ' io.codearte.nexus-staging'
29- apply plugin : ' com.bmuschko.nexus'
24+ // custom tasks for creating source/javadoc jars
25+ task sourcesJar (type : Jar , dependsOn : classes) {
26+ classifier = ' sources'
27+ from sourceSets. main. allSource
28+ }
3029
30+ task javadocJar (type : Jar , dependsOn : javadoc) {
31+ classifier = ' javadoc'
32+ from javadoc. destinationDir
33+ }
3134
3235idea {
3336 project {
3437 languageLevel = ' 1.8'
3538 vcs = ' Git'
36- ipr. withXml { xmlFile ->
37- // enable 'Annotation Processors'
38- xmlFile. asNode(). component. find {
39- println (it)
40- return it. @name == ' CompilerConfiguration'
41- }[' annotationProcessing' ][0 ]. replaceNode {
42- annotationProcessing {
43- profile(default : true , name : ' Default' , useClasspath : ' true' , enabled : true )
44- }
45- }
46- }
47- // TODO: add -parameters to IDEA's javac
4839 }
4940}
5041
@@ -84,52 +75,71 @@ dependencies {
8475
8576test. useTestNG()
8677
87- modifyPom {
88- project {
89- name ' graphql-java-annotations'
90- description ' Annotations-based syntax for GraphQL schema definition'
91- url ' https://github.com/graphql-java/graphql-java-annotations'
92- inceptionYear ' 2016'
93-
94- scm {
95- url ' https://github.com/graphql-java/graphql-java-annotations'
96- connection ' scm:https://yrashk@github.com/graphql-java/graphql-java-annotations.git'
97- developerConnection ' scm:git://github.com/graphql-java/graphql-java-annotations.git'
98- }
99-
100- licenses {
101- license {
102- name ' The Apache Software License, Version 2.0'
103- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
104- distribution ' repo'
105- }
106- }
107-
108- developers {
109- developer {
110- id ' yrashk'
111- name ' Yurii Rashkovskii'
112- email ' yrashk@gmail.com'
113- }
114- developer {
115- id ' apottere'
116- name ' Andrew Potter'
117- email ' Andrew.Potter@coxautoinc.com'
118- }
119- }
120- }
121- }
122-
12378publishing {
12479 publications {
125- MyPublication (MavenPublication ) {
80+ maven (MavenPublication ) {
12681 from components. java
12782 groupId ' com.graphql-java'
12883 artifactId project. name
12984 version project. version
13085
13186 artifact sourcesJar
13287 artifact javadocJar
88+
89+ pom. withXml {
90+ asNode(). children(). last() + {
91+ resolveStrategy = Closure . DELEGATE_FIRST
92+ name ' graphql-java-annotations'
93+ description ' Annotations-based syntax for GraphQL schema definition'
94+ url ' https://github.com/graphql-java/graphql-java-annotations'
95+ inceptionYear ' 2016'
96+
97+ scm {
98+ url ' https://github.com/graphql-java/graphql-java-annotations'
99+ connection ' scm:https://yrashk@github.com/graphql-java/graphql-java-annotations.git'
100+ developerConnection ' scm:git://github.com/graphql-java/graphql-java-annotations.git'
101+ }
102+
103+ licenses {
104+ license {
105+ name ' The Apache Software License, Version 2.0'
106+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
107+ distribution ' repo'
108+ }
109+ }
110+
111+ developers {
112+ developer {
113+ id ' yrashk'
114+ name ' Yurii Rashkovskii'
115+ email ' yrashk@gmail.com'
116+ }
117+ developer {
118+ id ' apottere'
119+ name ' Andrew Potter'
120+ email ' Andrew.Potter@coxautoinc.com'
121+ }
122+ }
123+ }
124+ }
125+ }
126+ }
127+ }
128+
129+ afterReleaseBuild. dependsOn bintrayUpload
130+
131+ bintray {
132+ user = System . getenv(' BINTRAY_USER' ) ?: project. findProperty(' BINTRAY_USER' ) ?: ' '
133+ key = System . getenv(' BINTRAY_KEY' ) ?: project. findProperty(' BINTRAY_KEY' ) ?: ' '
134+ publications = [' maven' ]
135+ publish = true
136+ pkg {
137+ repo = ' maven'
138+ name = project. name
139+ licenses = [' Apache-2.0' ]
140+ vcsUrl = ' https://github.com/graphql-java/graphql-java-servlet'
141+ version {
142+ name = project. version
133143 }
134144 }
135145}
0 commit comments