forked from davidmc24/gradle-avro-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
68 lines (59 loc) · 1.52 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:0.3"
classpath "com.github.townsfolk:gradle-release:1.2"
}
}
apply plugin: "groovy"
apply plugin: "idea"
repositories {
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile "org.apache.avro:avro-compiler:1.7.7"
compile "org.apache.commons:commons-io:1.3.2"
testCompile "org.spockframework:spock-core:0.7-groovy-1.8"
}
sourceCompatibility = 1.7
group = "com.commercehub.gradle.plugin"
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
classifier "sources"
extension "jar"
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
classifier "javadoc"
extension "jar"
}
apply plugin: "maven-publish"
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
apply plugin: "release"
apply plugin: "bintray"
def project = this
bintray {
user = project.hasProperty("bintrayUserName") ? bintrayUserName : null
key = project.hasProperty("bintrayApiKey") ? bintrayApiKey : null
publications = ["mavenJava"]
pkg {
repo = "main"
userOrg = "commercehub-oss"
name = project.name
licenses = ["Apache-2.0"]
}
}
bintrayUpload.dependsOn build, sourcesJar, javadocJar
createReleaseTag.dependsOn bintrayUpload