-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
107 lines (88 loc) · 3.21 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
apply plugin:'java'
apply plugin:'application'
defaultTasks 'run'
mainClassName='test.Main'
apply plugin: 'maven'
apply plugin: 'signing'
group = "com.panayotis"
archivesBaseName = "javaplot"
version = "0.5.0"
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
mavenCentral()
}
dependencies {
compile 'com.kitfox.svg:svg-salamander:1.1.2'
}
task dist(dependsOn:'jar') << {
exec () { executable 'ant'; workingDir 'demo'; args 'jar' }
delete 'build', 'demo/build', 'one', "/tmp/JavaPlot-${version}", "JavaPlot-${version}.tar.bz2", "JavaPlot-${version}.tar.bz2"
ant.copy(todir: "/tmp/JavaPlot-${version}", preservelastmodified: "true") {
fileset(dir: "../JavaPlot", excludes:"**/.DS_Store .hg/** .gradle/** .nb-gradle/**")
}
exec () { executable 'tar'; workingDir '/tmp'; args "-jcvf", "JavaPlot-${version}.tar.bz2", "JavaPlot-${version}" }
exec () { executable 'zip'; workingDir '/tmp'; args "-9", "-r", "JavaPlot-${version}.zip", "JavaPlot-${version}" }
copy() { from "/tmp/JavaPlot-${version}.tar.bz2"; into "."}
copy() { from "/tmp/JavaPlot-${version}.zip"; into="."}
delete "/tmp/JavaPlot-${version}", "/tmp/JavaPlot-${version}.tar.bz2", "/tmp/JavaPlot-${version}.zip"
}
clean << {
exec () {
executable 'ant'
workingDir 'demo'
args 'clean'
}
delete "JavaPlot-${version}.tar.bz2", "JavaPlot-${version}.zip"
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'JavaPlot'
packaging 'jar'
description 'A pure Java programming interface library for GNUPlot'
url 'http://http://javaplot.panayotis.com/'
scm {
connection 'scm:hg:http://hg.code.sf.net/p/gnujavaplot/hg gnujavaplot-hg'
developerConnection 'scm:hg:https://hg.code.sf.net/p/gnujavaplot/hg'
url 'https://sourceforge.net/projects/gnujavaplot/'
}
licenses {
license {
name 'The GNU Lesser General Public License, version 3.0'
url 'https://opensource.org/licenses/lgpl-3.0.html'
}
}
developers {
developer {
id 'teras'
name 'Panayotis Katsaloulis'
email '[email protected]'
}
}
}
}
}
}