This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
99 lines (82 loc) · 2.04 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
defaultTasks 'publishToMavenLocal'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
version '0.4-SNAPSHOT'
group 'org.jacamo'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven { url "http://jacamo.sourceforge.net/maven2" }
}
dependencies {
compile group: 'org.jacamo', name: 'jacamo', version: '0.8'
compile group: 'org.apache.camel', name: 'camel-core', version: '2.22.1'
compile group: 'javax.xml', name: 'jaxb-api', version: '2.1'
compile group: 'org.springframework', name: 'spring-context', version: '5.0.10.RELEASE'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
resources {
srcDir 'src/resources'
}
}
}
clean {
delete 'bin'
delete 'build'
}
task javadocJar (type: Jar, dependsOn: javadoc) {
baseName 'jacamo-camel'
classifier = 'javadoc'
//from '${docsDir}/../../doc/api'
}
task sourceJar (type : Jar) {
baseName 'jacamo-camel'
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourceJar, javadocJar
}
publishing {
publications {
maven(MavenPublication) {
from components.java
artifactId 'jacamo-camel'
artifact sourceJar
artifact javadocJar
}
}
}
task publishMavenGitHub(dependsOn: [ 'build', 'publishToMavenLocal']) {
doLast {
def wdir = System.getProperty("user.home")+'/.m2/repository/org/jacamo/jacamo-camel'
def rdir = System.getProperty("user.home")+'/pro/jacamo-mvn-repo'
exec {
commandLine 'git', 'pull'
workingDir rdir
}
copy {
from wdir
into rdir + '/org/jacamo/jacamo-camel'
}
exec {
commandLine 'git', 'add', '*'
workingDir rdir
}
exec {
commandLine 'git', 'commit', '-a', '-m', 'New version of jacamo-camel: '+project.version
workingDir rdir
}
exec {
commandLine 'git', 'push'
workingDir rdir
}
}
}