-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
136 lines (115 loc) · 4.13 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import java.text.SimpleDateFormat
plugins {
id "com.jfrog.bintray" version "1.8.4"
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
def getDevelopmentVersion() {
def output = new StringBuilder()
def error = new StringBuilder()
def gitShortHash = "git -C ${projectDir} rev-parse --short HEAD".execute()
gitShortHash.waitForProcessOutput(output, error)
def gitHash = output.toString().trim()
if (gitHash.isEmpty()) {
println "git hash is empty: error: ${error.toString()}"
throw new IllegalStateException("git hash could not be determined")
}
new SimpleDateFormat('yyyy-MM-dd\'T\'HH-mm-ss').format(new Date()) + "-" + gitHash
}
def releaseVersion = System.properties.RELEASE_VERSION
println "Building version = " + releaseVersion
version = releaseVersion ? releaseVersion : getDevelopmentVersion()
group = 'com.graphql-java'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://dl.bintray.com/andimarek/graphql-java" }
}
dependencies {
compile "com.graphql-java:graphql-java:13.0"
compile 'org.slf4j:slf4j-api:1.7.25'
compile "javax.validation:validation-api:2.0.1.Final"
compile "org.hibernate.validator:hibernate-validator:6.0.17.Final"
//compile "org.hibernate.validator:hibernate-validator:6.1.0.Alpha5"
compile "javax.el:javax.el-api:3.0.0"
compile "org.glassfish:javax.el:3.0.0"
testCompile 'org.slf4j:slf4j-simple:1.7.25'
testCompile 'org.spockframework:spock-core:1.1-groovy-2.4'
testCompile 'org.codehaus.groovy:groovy-all:2.5.7'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId group
artifactId 'graphql-java-extended-validation'
version version
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'graphql-java-extended-validation'
description 'A library fo extended validation for graphql-java'
url 'https://github.com/graphql-java/graphql-java-extended-validation'
inceptionYear '2019'
scm {
url 'https://github.com/graphql-java/graphql-java-extended-validation'
connection 'scm:git@github.com:graphql-java/graphql-java-extended-validation.git'
developerConnection 'scm:git@github.com:graphql-java/graphql-java-extended-validation.git'
}
licenses {
license {
name 'MIT'
url 'https://github.com/graphql-java/graphql-java/blob/master/LICENSE.md'
distribution 'repo'
}
}
developers {
developer {
id 'bbakerman'
name 'Brad Baker'
email 'bbakerman@gmail.com'
}
}
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_API_KEY')
publications = ['maven']
publish = true
pkg {
userOrg = 'graphql-java'
repo = 'graphql-java'
name = "graphql-java-extended-validation"
desc = 'A library fo extended validation for graphql-java'
licenses = ['MIT']
vcsUrl = 'https://github.com/graphql-java/graphql-java-extended-validation.git'
version {
released = new Date()
vcsTag = project.version
gpg {
sign = true
}
}
}
}