forked from pwielgolaski/teamcity-oauth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
96 lines (84 loc) · 2.62 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
buildscript {
repositories {
maven { url "https://plugins.gradle.org/m2/" }
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.5'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.4.1'
classpath 'com.github.rodm:gradle-teamcity-plugin:0.8.1'
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'com.github.rodm.teamcity-server'
apply plugin: 'pl.allegro.tech.build.axion-release'
apply plugin: 'com.jfrog.bintray'
scmVersion {
tag {
prefix = project.name
}
versionCreator 'versionWithBranch'
localOnly = true
}
version = scmVersion.version
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit'
}
// mandatory dependencies for using Spock
testCompile 'org.codehaus.groovy:groovy-all:2.4.1'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'org.springframework:spring-test:4.0.9.RELEASE'
testCompile 'com.squareup.okhttp3:mockwebserver:3.4.1'
}
ext {
teamcityVersion = '10.0.2'
teamcityDir = "$rootDir/servers/TeamCity-${teamcityVersion}"
teamcityDataDir = "$rootDir/data/"
teamcityJavaHome = System.properties['java.home']
}
teamcity {
version = teamcityVersion
descriptor {
name = project.name
displayName = project.name
version = project.version
vendorName = 'wielgolaski.me'
description = 'oAuth2 authentication plugin'
downloadUrl = 'https://github.com/pwielgolaski/teamcity-oauth/'
email = '[email protected]'
}
homeDir = file(teamcityDir)
dataDir = file(teamcityDataDir)
javaHome = file(teamcityJavaHome)
}
deployPlugin.dependsOn assemble
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
filesSpec {
from 'build/distributions'
into '.'
}
pkg {
repo = 'generic'
name = project.name
desc = project.name
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/pwielgolaski/teamcity-oauth.git'
labels = ['teamcity', 'oauth']
publicDownloadNumbers = true
version {
name = project.version
desc = 'TeamCity oAuth authentication Plugin'
}
}
}
bintrayUpload.onlyIf {
!(version ==~ /.*SNAPSHOT/)
}