This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
166 lines (139 loc) · 4.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
plugins {
id "us.ihmc.gradle.ihmc-build" version "0.0.19"
}
repositories {
maven {
url "http://dl.bintray.com/ihmcrobotics/maven-release"
}
}
apply plugin: "java"
apply plugin: "maven-publish"
apply plugin: "com.jfrog.bintray"
sourceCompatibility = 1.8
version = "0.7.0"
group = "us.ihmc"
project.ext.fullVersion = version
project.ext.vcsUrl = "https://github.com/ihmcrobotics/euclid-core"
project.ext.licenseURL = "http://www.apache.org/licenses/LICENSE-2.0.txt"
project.ext.licenseName = "The Apache Software License, Version 2.0"
project.ext.bintrayLicenseName = "Apache-2.0"
project.ext.publicationName = "euclid-core"
jar {
manifest {
attributes(
"Created-By": "IHMC Gradle Build Script",
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Implementation-Vendor": "IHMC",
"Bundle-Name": project.name,
"Bundle-Version": project.version,
"Bundle-License": "IHMC Proprietary",
"Bundle-Vendor": "IHMC")
}
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allJava
}
task testJar(type: Jar, dependsOn: [classes, testClasses]) {
classifier = "test"
from sourceSets.test.output
}
// Task to generate javadocs into relevant website directory
task genJavadocs(type: Javadoc, dependsOn: sourceJar) {
source = sourceSets.main.allJava
classpath = configurations.compile
destinationDir = file("websitedocs/website/static/javadocs")
setFailOnError(false)
}
//Ensure the replacestyles.sh script is run before the following task:
// Task to rename the javadocs directory with the version number
task javadocsVersion (dependsOn: genJavadocs) {
file("websitedocs/website/static/javadocs").renameTo(file("websitedocs/website/static/javadocs" + "-" + version))
}
//Task to create a new version in docusaurus
task docsVersion (type: Exec, dependsOn: javadocsVersion) {
workingDir "websitedocs/website"
commandLine "yarn", "run", "version", version
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId "us.ihmc"
artifactId project.ext.publicationName
version "$version"
from components.java
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name project.name
description "Euclid Core is library providing the common tools useful for geometric applications and vectorial math."
url project.ext.vcsUrl
licenses {
license {
name project.ext.licenseName
url project.ext.licenseURL
distribution "repo"
}
}
developers {
developer {
id "sbertrand"
name "Sylvain Bertrand"
email "sbertrand@ihmc.us"
}
developer {
id "dcalvert"
name "Duncan Calvert"
email "dcalvert@ihmc.us"
}
}
}
}
artifact sourceJar {
classifier "sources"
}
artifact testJar {
classifier "test"
}
}
}
}
def bintrayUsernameString = project.hasProperty("bintray_user") ? bintray_user : "unknown"
def bintrayPasswordString = project.hasProperty("bintray_key") ? bintray_key : "unknown"
bintray {
user = bintrayUsernameString
key = bintrayPasswordString
dryRun = false
publish = false
publications = ["mavenJava"]
pkg {
repo = "maven-release"
name = project.ext.publicationName
userOrg = "ihmcrobotics"
desc = "IHMC Open Robotics Software Project ${project.name}"
websiteUrl = project.ext.vcsUrl
issueTrackerUrl = "${project.ext.vcsUrl}/issues"
vcsUrl = "${project.ext.vcsUrl}.git"
licenses = [project.ext.bintrayLicenseName]
labels = ["ihmc", "java", "geometry", "vector", "math"]
publicDownloadNumbers = true
version {
name = project.ext.fullVersion
desc = "IHMC Open Robotics Software Project ${project.name} v${project.ext.fullVersion}"
released = new Date()
vcsTag = "v${project.version}"
}
}
}
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
testCompile group: "junit", name: "junit", version: "4.12"
testCompile group: "org.pitest", name: "pitest", version: "1.2.0"
testCompile group: "org.pitest", name: "pitest-command-line", version: "1.2.0"
compile group: "org.ejml", name: "dense64", version: "0.30"
}