forked from qupath/qupath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (65 loc) · 2.73 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
plugins {
id 'qupath.java-conventions'
id 'version-catalog'
id 'maven-publish'
}
// We don't want to generate javadocs for the root project
javadoc.enabled = false
// See https://discuss.gradle.org/t/best-approach-gradle-multi-module-project-generate-just-one-global-javadoc/18657
task mergedJavadocs(type: Javadoc,
description: 'Generate merged javadocs for all projects',
group: 'Documentation',
dependsOn: subprojects.tasks.collect {it.withType(Javadoc)} ) {
destinationDir = file("$buildDir/docs-merged/javadoc")
title = "QuPath $gradle.ext.qupathVersion"
// See https://docs.gradle.org/current/javadoc/org/gradle/external/javadoc/StandardJavadocDocletOptions.html
options.author(true)
options.addStringOption('Xdoclint:none', '-quiet')
options.encoding = 'UTF-8'
options.links "https://docs.oracle.com/en/java/javase/${libs.versions.jdk.get()}/docs/api/"
// Need to use the major version only with javafx
options.links "https://openjfx.io/javadoc/${libs.versions.javafx.get().split('\\.')[0]}/"
options.links "https://javadoc.io/doc/org.bytedeco/javacpp/${libs.versions.javacpp.get()}/"
options.links "https://javadoc.io/doc/org.bytedeco/opencv/${libs.versions.opencv.get()}/"
options.links "https://javadoc.io/doc/com.google.code.gson/gson/${libs.versions.gson.get()}/"
options.links "https://javadoc.io/doc/org.locationtech.jts/jts-core/${libs.versions.jts.get()}/"
options.links "https://javadoc.io/doc/net.imagej/ij/${libs.versions.imagej.get()}/"
options.links "https://javadoc.scijava.org/Bio-Formats/"
options.links "https://javadoc.io/doc/ai.djl/api/${libs.versions.deepJavaLibrary.get()}/"
// Don't fail on error, because this happened too often due to a javadoc link being temporarily down
failOnError = false
}
/*
* Get version catalog
*/
catalog {
versionCatalog {
from(files("./gradle/libs.versions.toml"))
}
}
/*
* Publish catalog to help with dependency management across extensions
*/
publishing {
repositories {
maven {
name = "SciJava"
def releasesRepoUrl = uri("https://maven.scijava.org/content/repositories/releases")
def snapshotsRepoUrl = uri("https://maven.scijava.org/content/repositories/snapshots")
// Use gradle -Prelease publish
url = project.hasProperty('release') ? releasesRepoUrl : snapshotsRepoUrl
credentials {
username = System.getenv("MAVEN_USER")
password = System.getenv("MAVEN_PASS")
}
}
}
publications {
maven(MavenPublication) {
groupId = 'io.github.qupath'
artifactId = 'qupath-catalog'
version = gradle.ext.qupathVersion
from components.versionCatalog
}
}
}