-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
63 lines (54 loc) · 1.63 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
plugins {
id 'java'
id 'application'
id("maven-publish")
}
group 'me.yixqiao'
version '0.4.0'
application {
mainClassName = "me.yixqiao.jlearn.testing.MNIST"
}
configurations {
javadocCoverage
}
repositories {
mavenCentral()
}
run {
enableAssertions = true
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.12'
javadocCoverage "com.manoelcampos:javadoc-coverage:1.1.0"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/yixqiao/jlearn")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
// This generates the Javadoc coverage report into build/reports/javadoc/javadoc-coverage.html
task javadocCoverageReport(type: Javadoc, dependsOn: javadoc) {
source = sourceSets.main.allJava
destinationDir = reporting.file("javadoc")
options.docletpath = configurations.javadocCoverage.files.asType(List)
options.doclet = "com.manoelcampos.javadoc.coverage.CoverageDoclet"
}
// Optionally you can add the dependsOn here so that when you generate the javadoc
// jar, e.g. if you include the javadocJar in a publishing configuration, the javadoc
// coverage report will be generated automatically.
task javadocJar(type: Jar, dependsOn: javadocCoverageReport) {
classifier "javadoc"
from javadoc.destinationDir
}