-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
96 lines (83 loc) · 2.23 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
plugins {
id 'java'
id 'groovy'
id 'eclipse'
id 'maven-publish'
id 'com.jfrog.bintray' version '1.2'
id 'net.swisstech.eclipseenhancer' version '1.0.0'
}
description = 'Gradle plugin to start/stop dropwizard manually as well as part of a test task and build a runnable jar file'
group = 'net.swisstech'
version = '1.1.11'
sourceCompatibility = 1.6
targetCompatibility = 1.6
// normal repositories and dependencies
repositories {
jcenter()
mavenLocal()
mavenCentral()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'net.swisstech:swissarmyknife:1.1.6'
compile 'org.slf4j:slf4j-api:1.7.7'
compile 'org.yaml:snakeyaml:1.14'
runtime 'com.github.jengelman.gradle.plugins:shadow:1.1.2'
testCompile 'org.testng:testng:6.8.8'
testCompile 'ch.qos.logback:logback-classic:1.1.2'
}
// task to generate wrapper
task wrapper(type: Wrapper) {
gradleVersion = '2.4'
}
// source-code jar
task sourceJar(type: Jar) {
from sourceSets.main.allSource
}
// bintray uses the publication, also includes source jar
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier 'sources'
}
}
}
}
def getProperty = { String name ->
try {
return project[name]
}
catch (MissingPropertyException e) {
println "!!! property ${name} is not available"
return ""
}
}
apply plugin: 'com.jfrog.bintray'
bintray {
// key and user must be in your ~/.gradle/gradle.properties
key = getProperty('swisstech_bintray_apikey')
user = getProperty('swisstech_bintray_user')
dryRun = false
publish = true
publications = [ 'mavenJava' ]
pkg {
repo = 'maven'
name = project.name
desc = project.description
licenses = [ 'Apache-2.0' ]
websiteUrl = "https://github.com/stackmagic/${project.name}"
vcsUrl = "https://github.com/stackmagic/${project.name}.git"
issueTrackerUrl = "https://github.com/stackmagic/${project.name}/issues"
publicDownloadNumbers = true
version {
name = project.version
desc = project.description
attributes = [
'gradle-plugin': "${project.group}.${project.name - 'gradle-'}:${project.group}:${project.name}"
]
}
}
}