1- def getAppVersion = { ->
2- try (final var gitTagOut = new ByteArrayOutputStream ()) {
3- exec {
4- commandLine ' git' , ' tag' , ' --points-at' , ' HEAD'
5- standardOutput = gitTagOut
6- }
7- final var tagName = gitTagOut. toString(). strip()
8- if (tagName. isBlank()) {
9- try (final var gitHashOut = new ByteArrayOutputStream ()) {
10- exec {
11- commandLine ' git' , ' rev-parse' , ' --short' , ' HEAD'
12- standardOutput = gitHashOut
13- }
14- return ' git-' + gitHashOut. toString(). strip()
15- }
16- } else {
17- return tagName
18- }
19- }
20- } as Object
21-
221ext {
23- VERSION = getAppVersion()
24- ORG = ' sava-software'
25- REPO = ' solana-programs'
2+ VERSION = project. findProperty(' version' )
263 VCS_URL = ' https://github.com/sava-software/solana-programs'
274}
285
@@ -32,7 +9,7 @@ apply plugin: 'maven-publish'
329project. group = ' software.sava'
3310project. version = " $VERSION "
3411
35- final JLV = JavaLanguageVersion . of(project. findProperty(' jv ' ) as Integer ?: 23 )
12+ final JLV = JavaLanguageVersion . of(project. findProperty(' javaVersion ' ) as Integer ?: 23 )
3613
3714plugins. withType(JavaPlugin ). configureEach {
3815 java {
@@ -75,29 +52,51 @@ test {
7552 useJUnitPlatform()
7653 testLogging {
7754 events " passed" , " skipped" , " failed" , " standardOut" , " standardError"
78- exceptionFormat " full"
79- showStandardStreams true
55+ exceptionFormat = " full"
56+ showStandardStreams = true
8057 }
8158}
8259
83- tasks. register(' sourcesJar' , Jar ) {
84- from sourceSets. main. allJava
85- archiveClassifier. set(' sources' )
60+ tasks. withType(Javadoc ). configureEach {
61+ options. addStringOption(' Xdoclint:none' , ' -quiet' )
62+ }
63+
64+ java {
65+ withJavadocJar()
66+ withSourcesJar()
8667}
8768
8869publishing {
8970 publications {
9071 mavenJava(MavenPublication ) {
9172 from components. java
92- artifact sourcesJar
93- groupId project. group
94- artifactId project. name
73+
74+ groupId = project. group
75+ artifactId = project. name
9576 version = project. version
77+
9678 pom {
9779 name = project. name
80+ description = " Native Solana & SPL Program Clients "
9881 url = " $VCS_URL "
82+ licenses {
83+ license {
84+ name = ' GNU General Public License v3.0'
85+ url = ' https://github.com/sava-software/solana-programs/blob/main/LICENSE'
86+ }
87+ }
88+ developers {
89+ developer {
90+ name = ' Jim'
91+ id = ' jpe7s'
92+ 93+ organization = ' Sava Software'
94+ organizationUrl = ' https://github.com/sava-software'
95+ }
96+ }
9997 scm {
10098 connection
= ' scm:git:[email protected] :sava-software/solana-programs.git' 99+ developerConnection
= ' scm:git:[email protected] :sava-software/solana-programs.git' 101100 url = " $VCS_URL "
102101 }
103102 }
@@ -114,4 +113,4 @@ publishing {
114113 }
115114 }
116115 }
117- }
116+ }
0 commit comments