-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
102 lines (88 loc) · 2.18 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
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
group 'io.squark'
version '0.1.1'
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = 1.8
mainClassName = 'io.squark.swaggercombine.SwaggerCombine'
task (fatJar, type: Jar) {
manifest {
attributes 'Main-Class': mainClassName
}
baseName = project.name + '-all'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task (sourceJar, type: Jar) {
from sourceSets.main.allJava
classifier "sources"
}
task (javadocJar, type: Jar) {
from javadoc
classifier "javadoc"
}
def pomConfig = {
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
developers {
developer {
id "erik"
name "Erik Håkansson"
email "erik@squark.io"
}
}
scm {
url "https://github.com/squark-io/timewise.git"
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
artifact javadocJar
pom.withXml {
def root = asNode()
root.appendNode('description', 'Combines multiple swagger.json files')
root.appendNode('name', 'SwaggerCombine')
root.appendNode('url', 'https://squark.io')
root.children().last() + pomConfig
}
}
}
}
bintray {
Properties properties = new Properties()
properties.load( new FileInputStream("local.properties"))
user = properties.getProperty("bintray.user")
key = properties.getProperty("bintray.apikey")
publications = ['mavenJava']
pkg {
repo = 'squark.io'
name = 'swagger-combine'
userOrg = 'squark-io'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/squark-io/swagger-combine.git'
publish = true
version {
name = rootProject.version
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'io.swagger', name: 'swagger-parser', version: '1.0.25'
compile group: 'io.swagger', name: 'swagger-core', version: '1.5.12'
testCompile group: 'junit', name: 'junit', version: '4.11'
}