-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.gradle
139 lines (117 loc) · 3.69 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/*
* Copyright (c) Fundacion Jala. All rights reserved.
* Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'cobertura'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
ext {
jUnitVersion = '4.7'
gradleWrapperVersion = '2.13'
spockGroovyVer = GroovySystem.version.replaceAll(/\.\d+$/,'')
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "net.saliman:gradle-cobertura-plugin:2.0.0"
//If you are using Gradle version less than 2.4 version you should use:
//classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
}
}
build.doLast {
uploadArchives.execute()
}
task wrapper(type: Wrapper) {
gradleVersion = "${gradleWrapperVersion}"
}
cobertura {
coverageFormats << "xml"
coverageSourceDirs << project.sourceSets.main.groovy.srcDirs
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.twmacinta:fast-md5:2.7.1'
compile 'xmlunit:xmlunit:1.3'
compile 'com.force.api:force-metadata-api:32.0.0'
compile 'com.force.api:force-partner-api:32.0.0'
compile 'com.force.api:force-apex-api:32.0.0'
compile 'com.force.api:force-wsc:32.0.0'
compile 'org.cometd.java:bayeux-api:2.3.1'
compile 'org.cometd.java:cometd-java-client:2.3.1'
compile 'org.cometd.java:cometd-java-common:2.3.1'
compile 'com.force.api:force-tooling-api:32.0.0'
compile 'org.eclipse.jetty:jetty-client:7.4.4.v20110707'
compile 'org.eclipse.jetty:jetty-http:7.4.4.v20110707'
compile 'org.eclipse.jetty:jetty-io:7.4.4.v20110707'
compile 'org.eclipse.jetty:jetty-util:7.4.4.v20110707'
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.5.0-RC2'
testCompile ("org.spockframework:spock-core:1.0-groovy-${spockGroovyVer}") {
exclude module : 'groovy-all'
}
testCompile 'cglib:cglib-nodep:2.2'
testCompile "junit:junit:${jUnitVersion}"
}
group = 'org.fundacionjala.gradle.plugins.enforce'
def major = "$System.env.VERSION_NUMBER_MAJOR"
def minor = "$System.env.VERSION_NUMBER_MINOR"
def patch = "$System.env.VERSION_NUMBER_PATCH"
def newVersion = "$major.$minor.$patch"
version = newVersion
uploadArchives {
repositories {
mavenDeployer {
repository url: "file://${System.properties['user.home']}/.m2/repository"
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
publishing {
publications {
mavenJava(MavenPublication) {
if (plugins.hasPlugin('war')) {
from components.web
} else {
from components.java
}
artifact sourcesJar
}
}
}
bintray {
user = "$System.env.BINTRAY_USER_NAME"
key = "$System.env.BINTRAY_API_KEY"
publications = ['mavenJava']
dryRun = false
publish = true
pkg {
repo = bintray_repo
userOrg = bintray_user_org
name = bintray_package
websiteUrl = 'https://github.com/fundacionjala/enforce-gradle-plugin'
issueTrackerUrl = 'https://github.com/fundacionjala/enforce-gradle-plugin/issues'
vcsUrl = 'https://github.com/fundacionjala/enforce-gradle-plugin.git'
licenses = ['MIT']
labels = ['sfdc', 'integration ', 'continuous', 'jenkins', 'gradle']
publicDownloadNumbers = true
}
}