22 * Gradle build file for the Whiteflag Java Library
33 */
44
5- // Project information
5+ /* Plugins */
6+ plugins {
7+ id ' java'
8+ id ' java-library'
9+ id ' java-library-distribution'
10+ id ' distribution'
11+ id ' maven-publish'
12+ }
13+ /* Project information */
614version = ' 1.2.0-dev'
715group = ' org.whiteflagprotocol.java'
816
9- // Display basic information
17+ /* Display basic information */
1018println " Configuration for ${ project.rootProject} " ;
1119println " project: ${ project.name} "
1220println " group: ${ project.group} "
1321println " version: ${ project.version} " ;
1422println " directory: ${ project.projectDir} " ;
1523
16- // Plugins
17- apply plugin : ' java'
18- apply plugin : ' java-library'
19- apply plugin : ' java-library-distribution'
20- apply plugin : ' maven-publish'
21-
22- // Repositories and Dependencies
24+ /* Repositories and Dependencies */
2325repositories {
2426 mavenCentral()
2527}
26-
2728dependencies {
2829 testImplementation ' junit:junit:4.13.2'
2930 implementation ' com.fasterxml.jackson.core:jackson-databind:2.15.2'
3031 implementation ' com.networknt:json-schema-validator:1.0.87'
3132 implementation ' org.bouncycastle:bcprov-jdk18on:1.76'
3233}
33-
34- // Test behaviour
35- test {
36- testLogging {
37- events " FAILED" , " STANDARD_OUT" , " STANDARD_ERROR"
38- }
39- }
40-
41- // Include documentation and source
42- java {
43- withJavadocJar()
44- withSourcesJar()
45- }
46-
47- // Metadata
34+ /* Metadata */
4835jar {
4936 manifest {
5037 attributes(' Implementation-Title' : project. name,
5138 ' Implementation-Version' : project. version)
5239 }
5340}
54-
55- // Distribution
41+ /* Testing */
42+ test {
43+ testLogging {
44+ events " FAILED" , " STANDARD_OUT" , " STANDARD_ERROR"
45+ }
46+ }
47+ /* Distribution */
5648distributions {
5749 main {
5850 distributionBaseName = project. name
5951 }
6052}
61-
62- // Publishing library as package
53+ /* Include documentation and source */
54+ java {
55+ withJavadocJar()
56+ withSourcesJar()
57+ }
58+ /* Documentation */
59+ javadoc {
60+ options. tags = [ ' wfver:a:Whiteflag version:' ,
61+ ' wfref:a:Whiteflag standard x-reference:' ]
62+ options. stylesheetFile = project. file(" src/main/javadoc/style.css" )
63+ options. overview = " src/main/javadoc/overview.html"
64+ }
65+ task docs (type : Copy ) {
66+ dependsOn javadoc
67+ from " $buildDir /docs/javadoc"
68+ into " docs/javadoc"
69+ }
70+ /* Publishing library as package */
6371publishing {
6472 repositories {
6573 maven {
@@ -84,18 +92,3 @@ publishing {
8492 }
8593 }
8694}
87-
88- // Javadoc options
89- javadoc {
90- options. tags = [ ' wfver:a:Whiteflag version:' ,
91- ' wfref:a:Whiteflag standard x-reference:' ]
92- options. stylesheetFile = project. file(" src/main/javadoc/style.css" )
93- options. overview = " src/main/javadoc/overview.html"
94- }
95-
96- // Task to build documentation
97- task docs (type : Copy ) {
98- dependsOn javadoc
99- from " $buildDir /docs/javadoc"
100- into " docs/javadoc"
101- }
0 commit comments