Skip to content
This repository was archived by the owner on Oct 25, 2021. It is now read-only.

Commit 1e99af1

Browse files
committed
build work
1 parent 3d8d478 commit 1e99af1

File tree

5 files changed

+177
-2
lines changed

5 files changed

+177
-2
lines changed

LICENSE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Andreas Marek and Contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
6+
(the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,
7+
publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
8+
so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
13+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
14+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
15+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

build.gradle

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
import java.text.SimpleDateFormat
2+
3+
def getDevelopmentVersion() {
4+
def output = new StringBuilder()
5+
def error = new StringBuilder()
6+
def gitShortHash = "git -C ${projectDir} rev-parse --short HEAD".execute()
7+
gitShortHash.waitForProcessOutput(output, error)
8+
def gitHash = output.toString().trim()
9+
if (gitHash.isEmpty()) {
10+
println "git hash is empty: error: ${error.toString()}"
11+
throw new IllegalStateException("git hash could not be determined")
12+
}
13+
new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date()) + "-" + gitHash
14+
}
15+
16+
buildscript {
17+
repositories {
18+
jcenter()
19+
}
20+
dependencies {
21+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.+'
22+
}
23+
}
24+
25+
subprojects {
26+
27+
apply plugin: 'com.jfrog.bintray'
28+
apply plugin: 'java'
29+
apply plugin: 'maven'
30+
apply plugin: 'maven-publish'
31+
32+
33+
34+
sourceCompatibility = 1.8
35+
targetCompatibility = 1.8
36+
def releaseVersion = System.env.RELEASE_VERSION
37+
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
38+
group = 'com.graphql-java'
39+
40+
41+
repositories {
42+
mavenCentral()
43+
mavenLocal()
44+
}
45+
46+
apply plugin: 'groovy'
47+
48+
49+
task sourcesJar(type: Jar) {
50+
dependsOn classes
51+
classifier 'sources'
52+
from sourceSets.main.allSource
53+
}
54+
55+
task javadocJar(type: Jar, dependsOn: javadoc) {
56+
classifier = 'javadoc'
57+
from javadoc.destinationDir
58+
}
59+
60+
javadoc {
61+
options.encoding = 'UTF-8'
62+
}
63+
64+
artifacts {
65+
archives sourcesJar
66+
archives javadocJar
67+
}
68+
69+
publishing {
70+
71+
publications {
72+
73+
graphqlJava(MavenPublication) {
74+
version version
75+
from components.java
76+
77+
artifact sourcesJar {
78+
classifier "sources"
79+
}
80+
artifact javadocJar {
81+
classifier "javadoc"
82+
}
83+
pom.withXml {
84+
asNode().children().last() + {
85+
resolveStrategy = Closure.DELEGATE_FIRST
86+
description 'GraphQL Java Spring'
87+
url "https://github.com/graphql-java/graphql-java-spring"
88+
scm {
89+
url "https://github.com/graphql-java/graphql-java-spring"
90+
connection "https://github.com/graphql-java/graphql-java-spring"
91+
developerConnection "https://github.com/graphql-java/graphql-java-spring"
92+
}
93+
licenses {
94+
license {
95+
name 'MIT'
96+
url 'https://github.com/graphql-java/graphql-java-spring/blob/master/LICENSE.md'
97+
distribution 'repo'
98+
}
99+
}
100+
developers {
101+
developer {
102+
id 'andimarek'
103+
name 'Andreas Marek'
104+
}
105+
}
106+
}
107+
}
108+
}
109+
}
110+
}
111+
112+
113+
bintray {
114+
user = System.env.BINTRAY_USER ?: project["bintray.user"]
115+
key = System.env.BINTRAY_API_KEY ?: project["bintray.key"]
116+
publications = ['graphqlJava']
117+
publish = true
118+
pkg {
119+
repo = 'graphql-java'
120+
name = 'graphql-java-spring'
121+
desc = 'GraphQL Java Spring integration'
122+
licenses = ['MIT']
123+
vcsUrl = 'https://github.com/graphql-java/graphql-java-spring'
124+
125+
version {
126+
name = project.version
127+
desc = project.description
128+
released = new Date()
129+
vcsTag = 'v' + project.version
130+
gpg {
131+
sign = true
132+
}
133+
mavenCentralSync {
134+
sync = true
135+
user = System.env.MAVEN_CENTRAL_USER
136+
password = System.env.MAVEN_CENTRAL_PASSWORD
137+
close = '1'
138+
}
139+
}
140+
}
141+
}
142+
143+
// all publish tasks depend on the build task
144+
tasks.withType(PublishToMavenRepository) {
145+
dependsOn build
146+
}
147+
148+
}
149+
150+
task wrapper(type: Wrapper) {
151+
gradleVersion = '4.10.2'
152+
distributionUrl = "https://services.gradle.org/distributions/gradle-${gradleVersion}-all.zip"
153+
}
154+

gradle.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
org.gradle.caching=true
2+
org.gradle.daemon=true
3+
org.gradle.parallel=true
4+
org.gradle.jvmargs=-Dfile.encoding=UTF-8
5+
6+
bintray.user=DUMMY_USER
7+
bintray.key=DUMMY_KEY

gradle/wrapper/gradle-wrapper.jar

1.72 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sat Nov 03 15:43:57 AEDT 2018
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip

0 commit comments

Comments
 (0)