-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
146 lines (129 loc) · 3.69 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
137
138
139
140
141
142
143
144
145
146
group = 'com.nfl.glitr'
version = PROJECT_VERSION
description = "A library that lets you use Plain Old Java Objects to describe your GraphQL schema."
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.1'
}
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
//noinspection GroovyUnusedAssignment
sourceCompatibility = 1.8
//noinspection GroovyUnusedAssignment
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
}
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
}
publishing {
publications {
projectPublish(MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version version
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name project.name
description project.description
url PROJECT_GITHUB_REPO_URL
scm {
url PROJECT_GITHUB_REPO_URL
connection PROJECT_GITHUB_REPO_URL
developerConnection PROJECT_GITHUB_REPO_URL
}
licenses {
license {
name 'MIT'
url PROJECT_LICENSE_URL
distribution 'repo'
}
}
developers {
developer {
id 'vaant'
name 'Arash Shokoufandeh'
}
}
}
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER') ?: project.findProperty('bintray.user')
key = System.getenv('BINTRAY_KEY') ?: project.findProperty('bintray.key')
publications = ['projectPublish']
publish = true
pkg {
repo = 'maven'
name = project.name
userOrg = 'nfl'
licenses = ['MIT']
vcsUrl = PROJECT_GITHUB_REPO_URL
version {
name = project.version
desc = project.description
released = new Date()
vcsTag = 'v'+ project.version
gpg {
sign = true
}
mavenCentralSync {
sync = project.property('maven.central.sync')
user = System.getenv('SONATYPE_USERNAME') ?: project.findProperty('sonatype.username')
password = System.getenv('SONATYPE_PASSWORD') ?: project.findProperty('sonatype.password')
}
}
}
}
// all publish tasks depend on the build task
tasks.withType(PublishToMavenRepository) {
dependsOn build
}
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
}
jar {
from "LICENSE"
manifest {
attributes(
"Specification-Title": project.name,
"Specification-Version": project.version,
"Implementation-Version": project.version,
)
}
}