Skip to content

Commit 3bf3edb

Browse files
committed
clean up build
1 parent 6a818c0 commit 3bf3edb

File tree

5 files changed

+38
-39
lines changed

5 files changed

+38
-39
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
run: |
4141
printf "\norg.gradle.java.installations.paths=%s" "$JAVA_HOME" >> gradle.properties
4242
java --version
43-
./gradlew -PtargetJava=${{ vars.JAVA_VERSION }} check --stacktrace --no-daemon
43+
./gradlew -PjavaVersion=${{ vars.JAVA_VERSION }} check --stacktrace --no-daemon
4444
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ jobs:
4040
run: |
4141
printf "\norg.gradle.java.installations.paths=%s" "$JAVA_HOME" >> gradle.properties
4242
java --version
43-
./gradlew --stacktrace --no-daemon -PtargetJava=${{ vars.JAVA_VERSION }} check publish
43+
./gradlew --stacktrace --no-daemon -PjavaVersion=${{ vars.JAVA_VERSION }} -Pversion=${{ github.ref_name }}} check publish
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,5 @@
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-
221
ext {
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'
329
project.group = 'software.sava'
3310
project.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

3714
plugins.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

8869
publishing {
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+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencyResolutionManagement {
1111
}
1212
versionCatalogs {
1313
libs {
14-
from("software.sava:solana-version-catalog:0.4.78")
14+
from("software.sava:solana-version-catalog:0.4.105")
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)