22 * Gradle build file for the Whiteflag Java Library
33 */
44
5- // Project information
6- version = ' 1.1.0'
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 */
14+ version = ' 1.1.1'
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.13.1'
3031 implementation ' org.bouncycastle:bcprov-jdk15on:1.70'
3132}
32-
33- // Test behaviour
34- test {
35- testLogging {
36- events " FAILED" , " STANDARD_OUT" , " STANDARD_ERROR"
37- }
38- }
39-
40- // Include documentation and source
41- java {
42- withJavadocJar()
43- withSourcesJar()
44- }
45-
46- // Metadata
33+ /* Metadata */
4734jar {
4835 manifest {
4936 attributes(' Implementation-Title' : project. name,
5037 ' Implementation-Version' : project. version)
5138 }
5239}
53-
54- // Distribution
40+ /* Testing */
41+ test {
42+ testLogging {
43+ events " FAILED" , " STANDARD_OUT" , " STANDARD_ERROR"
44+ }
45+ }
46+ /* Distribution */
5547distributions {
5648 main {
5749 distributionBaseName = project. name
5850 }
5951}
60-
61- // Publishing library as package
52+ /* Include documentation and source */
53+ java {
54+ withJavadocJar()
55+ withSourcesJar()
56+ }
57+ /* Documentation */
58+ javadoc {
59+ options. tags = [ ' wfver:a:Whiteflag version:' ,
60+ ' wfref:a:Whiteflag standard x-reference:' ]
61+ options. stylesheetFile = project. file(" src/main/javadoc/style.css" )
62+ options. overview = " src/main/javadoc/overview.html"
63+ }
64+ task docs (type : Copy ) {
65+ dependsOn javadoc
66+ from " $buildDir /docs/javadoc"
67+ into " docs/javadoc"
68+ }
69+ /* Publishing library as package */
6270publishing {
6371 repositories {
6472 maven {
@@ -83,18 +91,3 @@ publishing {
8391 }
8492 }
8593}
86-
87- // Javadoc options
88- javadoc {
89- options. tags = [ ' wfver:a:Whiteflag version:' ,
90- ' wfref:a:Whiteflag standard x-reference:' ]
91- options. stylesheetFile = project. file(" src/main/javadoc/style.css" )
92- options. overview = " src/main/javadoc/overview.html"
93- }
94-
95- // Task to build documentation
96- task docs (type : Copy ) {
97- dependsOn javadoc
98- from " $buildDir /docs/javadoc"
99- into " docs/javadoc"
100- }
0 commit comments