forked from org-arl/fjage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
134 lines (115 loc) · 3.22 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
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'signing'
defaultTasks 'jars'
archivesBaseName = 'fjage'
group = 'com.github.org-arl'
version = new File('VERSION').text.trim()
docsDirName = '../htdocs'
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.4.4'
compile 'jline:jline:2.12'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'uk.com.robust-it:cloning:1.9.0'
compile 'org.eclipse.jetty:jetty-server:8.0.4.v20111024'
compile 'org.eclipse.jetty:jetty-servlet:8.0.4.v20111024'
compile 'org.eclipse.jetty:jetty-eventsource-servlet:1.0.0'
compile 'com.google.code.gson:gson:2.8.2'
testCompile 'junit:junit:4.11'
}
compileJava {
options.compilerArgs << "-Xlint:all"
options.compilerArgs << "-Xlint:-options"
}
compileTestJava {
options.compilerArgs << "-Xlint:all"
options.compilerArgs << "-Xlint:-options"
}
compileGroovy {
options.compilerArgs << "-Xlint:all"
options.compilerArgs << "-Xlint:-options"
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
jar {
manifest {
attributes 'Build-Owner': System.getenv().USER, 'Build-Timestamp': new Date().format('d-MM-yyyy_HH:mm:ss'), 'Build-Version': version
}
}
task jars(dependsOn: jar, type: Copy) {
into "$buildDir/libs"
from configurations.runtime
}
jars.outputs.upToDateWhen { false }
task doc {
doLast {
ant.exec(executable: 'make', dir: '.', failonerror: true) {
arg(line: 'html')
}
}
}
////// tasks for MavenCentral deployment
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
}
pom.project {
name archivesBaseName
packaging 'jar'
description 'Framework for Java and Groovy Agents'
url 'http://github.com/org-arl/fjage'
scm {
url 'http://github.com/org-arl/fjage'
connection 'scm:git:git://github.com/org-arl/fjage.git'
developerConnection 'scm:git:[email protected]:org-arl/fjage.git'
}
licenses {
license {
name '3-clause BSD License'
url 'http://github.com/org-arl/fjage/blob/master/LICENSE.txt'
distribution 'repo'
}
}
developers {
developer {
id 'mchitre'
name 'Mandar Chitre'
}
}
}
}
}
}