-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (113 loc) · 3.76 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
/*
* Copyright (c) 2016.
* This file is part of OFlib.
*
* OFlib is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* OFlib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OFlib. If not, see <http://www.gnu.org/licenses/>.
*/
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
version = '0.2'
group = 'com.github.onyxfoxdevelopment'
// If TeamCity is running this build, lets set the version info
def buildNum = '0'
if (hasProperty("teamcity")) {
buildNum = teamcity["build.number"]
println "##teamcity[buildNumber '" + version + "." + buildNum + "']"
}
version = version + "." + buildNum
//noinspection GroovyUnusedAssignment
sourceCompatibility = 1.7
//noinspection GroovyUnusedAssignment
targetCompatibility = 1.7
repositories {
mavenCentral()
maven {
url "http://maven.walterbarnes.net:8081/nexus/content/groups/public"
}
}
dependencies {
testCompile 'junit:junit:4.11'
compile 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.google.guava:guava:19.0'
}
tasks.javadoc {
//noinspection GroovyUnusedAssignment
File destinationDir = new File('build/docs')
}
//noinspection GroovyAssignabilityCheck
jar {
from "LICENSE"
}
task javadocJar(type: Jar, dependsOn: 'javadoc') {
//noinspection GroovyAssignabilityCheck
from tasks.javadoc.destinationDir
from "LICENSE"
classifier = 'javadoc'
}
task sourcesJar(type: Jar) {
//noinspection GroovyAssignabilityCheck
from sourceSets.main.allSource
from "LICENSE"
from "README.md"
classifier = 'sources'
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
signing {
sign configurations.archives
}
//noinspection GroovyAssignabilityCheck
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(
url: "http://maven.walterbarnes.net:8081/nexus/content/repositories/releases") {
authentication(userName: nexusUsername, password: nexusPassword)
}
snapshotRepository(
url: "http://maven.walterbarnes.net:8081/nexus/content/repositories/snapshots") {
authentication(userName: nexusUsername, password: nexusPassword)
}
pom.project {
name = jar.baseName
packaging = 'jar'
description = 'Library used by all OnyxFox Development projects'
url = 'http://github.com/OnyxFox-Development/OFlib'
scm {
url = 'https://github.com/OnyxFox-Development/OFlib.git'
connection = 'scm:git:[email protected]/OnyxFox-Development/OFlib.git'
developerConnection = 'scm:git:[email protected]:OnyxFox-Development/OFlib.git'
}
licenses {
license {
name = 'GNU General Public License 3.0'
url = 'https://www.gnu.org/licenses/gpl-3.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'linuxdemon'
name = 'Walter Barnes'
}
}
}
}
}
}