forked from earocorn/osh-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
65 lines (52 loc) · 1.54 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
apply from: 'common.gradle'
apply from: 'release.gradle'
description = 'OSH Core Modules'
allprojects {
version = oshCoreVersion
}
// dependencies for inclusion in distribution
dependencies {
project.subprojects.each {
p -> implementation p
}
}
distributions {
main {
distributionBaseName = 'osh-core'
contents {
into('lib') {
from project.configurations.runtimeClasspath
}
}
}
}
// task to generate aggregated javadocs
Set<Project> javadocProjects = [':swe-common-core', ':sensorml-core', ':sensorhub-core']
task alljavadoc(type: Javadoc) {
dependsOn build
source javadocProjects.collect {name -> project(name).sourceSets.main.allJava}
classpath = files(javadocProjects.collect {name -> project(name).sourceSets.main.compileClasspath})
include 'org/sensorhub/api/**', 'net/opengis/**'
destinationDir = file("${buildDir}/docs/javadoc")
}
// task to publish javadocs to GitHub pages (osh-docs)
task releaseJavadoc {
doLast {
println '> Copying Javadoc to GitHub Pages'
def ghPagesDir = "$rootDir/../osh-docs/site/"
if (!new File(ghPagesDir).exists())
throw new GradleException('osh-docs github pages repo was not found locally')
// copy apidocs to osh-docs site repo
def javaDocRepoDir = "apidocs/v" + version
def javadocDir = ghPagesDir + javaDocRepoDir
mkdir javadocDir
copy {
into javadocDir
from ("${buildDir}/docs/javadoc") {
include '**/*'
}
}
}
}
releaseJavadoc.dependsOn alljavadoc
release.dependsOn releaseJavadoc