-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
90 lines (74 loc) · 2.12 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'net.researchgate:gradle-release:2.5.0'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
apply plugin: 'net.researchgate.release'
group = 'com.palominolabs.config'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
jcenter()
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.24'
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
compile group: 'commons-configuration', name: 'commons-configuration', version: '1.10'
compile group: 'com.google.inject', name: 'guice', version: '4.1.0'
compile group: 'org.skife.config', name: 'config-magic', version: '0.17'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.1'
}
task sourceJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allJava
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
// build a pom
publishing {
publications {
bintray(MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version project.version
artifact sourceJar {
classifier 'sources'
}
artifact javadocJar {
classifier 'javadoc'
}
}
}
}
bintray {
user = rootProject.hasProperty('bintrayUser') ? rootProject.property('bintrayUser') : 'FIXME'
key = rootProject.hasProperty('bintrayApiKey') ? rootProject.property('bintrayApiKey') : 'FIXME'
publications = ['bintray']
pkg {
repo = 'maven'
licenses = ['Copyfree']
vcsUrl = 'https://github.com/palominolabs/config-inject'
name = 'com.palominolabs.config:config-inject'
version {
name = project.version
released = new Date()
if (project.isReleaseVersion) {
vcsTag = 'v' + project.version
}
}
}
}
release {
tagTemplate = 'v$version'
}