-
Notifications
You must be signed in to change notification settings - Fork 24
/
build.gradle
159 lines (139 loc) · 4.9 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
147
148
149
150
151
152
153
154
155
156
157
158
159
import org.gradle.api.artifacts.maven.MavenDeployment
println """\
Welcome to Gradle $gradle.gradleVersion - http://www.gradle.org
Gradle home is set to: $gradle.gradleHomeDir
Gradle user directory is set to: $gradle.gradleUserHomeDir
Base directory: $projectDir
Running script ${relativePath(buildFile)}
"""
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'git'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'signing'
group = 'ws.antonov.gradle.plugins'
version = '0.9.2'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.ajoberstar:gradle-git:0.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
}
}
test {
//jvmArgs '-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
//debug true
}
repositories {
mavenCentral()
}
dependencies {
compile gradleApi()
testCompile group: 'junit', name: 'junit', version: '4.8.1'
compile localGroovy()
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
project.ext.set("signing.secretKeyRingFile", new File("${System.properties['user.home']}/.gnupg/secring.gpg"))
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task groovydocJar(type: Jar, dependsOn:groovydoc) {
classifier = 'groovydoc'
from groovydoc.destinationDir
}
artifacts {
archives sourcesJar
archives groovydocJar
}
signing {
// required { isReleaseVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
//repository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: System.getProperty('nexusUser'), password: System.getProperty('nexusPassword'))
}
pom.project {
name project.name
description "Gradle build plugin to handle Protocol Buffers automated code generation and compilation"
url "https://github.com/aantono/gradle-plugin-protobuf"
licenses {
license {
name "New BSD License"
url "http://www.opensource.org/licenses/bsd-license.php"
}
}
developers {
developer {
id "aantono"
name "Alex Antonov"
email "[email protected]"
}
developer {
id "valkolovos"
name "Val Kolovos"
email "[email protected]"
}
developer {
id "mleinartas"
name "Michael Leinartas"
email "[email protected]"
}
}
scm {
connection "scm:git:git://github.com/aantono/gradle-plugin-protobuf.git"
developerConnection "scm:git:[email protected]:aantono/gradle-plugin-protobuf.git"
url "https://github.com/aantono/gradle-plugin-protobuf"
}
}
}
}
}
bintray {
user = System.getProperty('bintrayUser')
key = System.getProperty('bintrayApiKey')
configurations = ['archives'] //When uploading configuration files
// - OR -
//publications = ['mavenStuff'] //When uploading Maven-based publication files
// - AND/OR -
// filesSpec { //When uploading any arbitrary files ('filesSpec' is a standard Gradle CopySpec)
// from 'arbitrary-files'
// into 'standalone_files/level1'
// rename '(.+)\\.(.+)', '$1-suffix.$2'
// }
dryRun = false //Whether to run this as dry-run, without deploying
publish = true //If version should be auto published after an upload
pkg {
repo = 'maven'
//userOrg = 'myorg' //An optional organization name when the repo belongs to one of the user's orgs
name = 'gradle-plugin-protobuf'
desc = 'Gradle Plugin for Google Protocol Buffers code generation/compilation.'
websiteUrl = 'https://github.com/aantono/gradle-plugin-protobuf'
issueTrackerUrl = 'https://github.com/aantono/gradle-plugin-protobuf/issues'
vcsUrl = 'https://github.com/aantono/gradle-plugin-protobuf.git'
licenses = ['BSD New']
labels = ['gradle', 'protobuf', 'plugin']
publicDownloadNumbers = true
attributes= ['gradle-plugin': 'protobuf:ws.antonov.gradle.plugins:gradle-plugin-protobuf'] //Optional package-level attributes
//Optional version descriptor
version {
name = '0.9.2' //Bintray logical version name
//desc = 'optional, version-specific description'
vcsTag = '0.9.2'
attributes = ['gradle-plugin': 'protobuf:ws.antonov.gradle.plugins:gradle-plugin-protobuf'] //Optional version-level attributes
}
}
}