-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
103 lines (88 loc) · 2.74 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
if (Boolean.valueOf(release) == false) {
version = version + '-SNAPSHOT'
}
group 'com.github.newnewcoder'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
apply plugin: 'com.jfrog.bintray'
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'idea'
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
mavenCentral()
}
ext {
archivesBaseName = 'jboss-curl-deploy-gradle-plugin'
description = 'It\'s a gradle plugin process jboss json api to deploy single war.'
}
task sourceJar(type: Jar, dependsOn: classes, description: 'Package source into jar') {
classifier = 'sources'
from sourceSets.main.allSource
}
task groovydocJar(type: Jar, dependsOn: groovydoc) {
classifier = 'groovydoc'
from groovydoc.destinationDir
}
artifacts {
archives sourceJar, groovydocJar
}
dependencies {
def httpclientVersion = '4.5.3'
compile gradleApi()
compile localGroovy()
compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
compile "org.apache.httpcomponents:fluent-hc:${httpclientVersion}"
compile "org.apache.httpcomponents:httpmime:${httpclientVersion}"
testCompile 'junit:junit:4.11'
}
publishing {
publications {
MyPublication(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.archivesBaseName
version = project.version
artifact sourceJar
artifact groovydocJar
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')
publications = ['MyPublication']
pkg {
repo = 'generic'
name = 'jboss-curl-deploy-gradle-plugin'
userOrg = user
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/newnewcoder/jboss-curl-deploy-gradle-plugin.git'
labels = ['JBossEAP', 'JBossWildly', 'deploy', 'gradle plugin']
publish = true
publicDownloadNumbers = true
version {
name = project.version
desc = project.description
released = new Date()
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}
apply plugin: 'application'
mainClassName = 'com.github.newnewcoder.jbosscurl.operator.TestHttpclient'
task execute(type: JavaExec) {
main = mainClassName
args = []
classpath = sourceSets.main.runtimeClasspath
}