Skip to content

Commit 38e6cb9

Browse files
committed
Added bintray support
1 parent fe582bd commit 38e6cb9

File tree

2 files changed

+90
-4
lines changed

2 files changed

+90
-4
lines changed

build.gradle

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ buildscript {
44
}
55
}
66

7+
plugins {
8+
id "com.jfrog.bintray" version "1.2"
9+
}
10+
711
apply plugin: 'java'
812
apply plugin: 'groovy'
13+
apply plugin: 'maven-publish'
14+
apply plugin: 'com.jfrog.bintray'
915

1016
group = 'com.graphql-java'
1117
version = '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:[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+
}

travis-build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ git rev-parse --short HEAD
55
BUILD_COMMAND="./gradlew assemble && ./gradlew check --info"
66
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then
77
echo "Building on master"
8-
BUILD_COMMAND="./gradlew clean assemble && ./gradlew check --info
9-
#
10-
# add this when ready for releasing
11-
# && ./gradlew bintrayUpload -x check --info"
8+
BUILD_COMMAND="./gradlew clean assemble && ./gradlew check --info && ./gradlew bintrayUpload -x check --info"
129
fi
1310
docker run -it --rm -v `pwd .`:/build -e RELEASE_VERSION=$RELEASE_VERSION -e BINTRAY_USER=$BINTRAY_USER -e BINTRAY_API_KEY=$BINTRAY_API_KEY -e MAVEN_CENTRAL_USER=$MAVEN_CENTRAL_USER -e MAVEN_CENTRAL_PASSWORD=$MAVEN_CENTRAL_PASSWORD -w /build openjdk:8u131-jdk bash -c "${BUILD_COMMAND}"

0 commit comments

Comments
 (0)