Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
squid233 committed Mar 23, 2024
1 parent a2b4596 commit 7e77231
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
java: [
22-ea
22
]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
Expand All @@ -39,17 +39,16 @@ jobs:
uses: gradle/actions/setup-gradle@v3
- name: Execute Gradle build
run: ./gradlew build
- name: Upload build reports
if: ${{ runner.os == 'Linux' && matrix.java == '22-ea' && failure() }}
uses: actions/upload-artifact@v4
with:
name: build-reports
path: |
modules/**/build/reports/
# - name: Upload build reports
# uses: actions/upload-artifact@v4
# with:
# name: build-reports-${{ matrix.java }}-${{ runner.os }}
# path: |
# modules/**/build/reports/
- name: Capture build artifacts
if: ${{ runner.os == 'Linux' && matrix.java == '22-ea' }}
if: ${{ runner.os == 'Linux' && matrix.java == '22' }}
uses: actions/upload-artifact@v4
with:
name: Artifacts
name: artifacts
path: |
modules/**/build/libs/
2 changes: 1 addition & 1 deletion .github/workflows/javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
java: [
22-ea
22
]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
Expand Down
11 changes: 6 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ val projVersion: String by project
val projVcs: String by project
val projBranch: String by project
val projLicenseYear: String by project
val projLicenseFileName: String by project
val orgName: String by project
val orgUrl: String by project

Expand Down Expand Up @@ -166,7 +167,7 @@ artifactNameMap.forEach { (subprojectName, artifactName) ->

tasks.named<Jar>("jar") {
manifestContentCharset = "utf-8"
metadataCharset = "utf-8"
setMetadataCharset("utf-8")
manifest.attributes(
"Specification-Title" to projName,
"Specification-Vendor" to "Overrun Organization",
Expand All @@ -176,22 +177,22 @@ artifactNameMap.forEach { (subprojectName, artifactName) ->
"Implementation-Version" to projVersion
)
archiveBaseName.set(artifactName)
from("LICENSE")
from(rootProject.file(projLicenseFileName)).rename(projLicenseFileName, "${projLicenseFileName}_$artifactName")
}

tasks.named<Jar>("sourcesJar") {
dependsOn(tasks["classes"])
archiveBaseName.set(artifactName)
archiveClassifier.set("sources")
from(sourceSets["main"].allSource, "LICENSE")
from(sourceSets["main"].allSource)
}

tasks.named<Jar>("javadocJar") {
val javadoc by tasks
dependsOn(javadoc)
archiveBaseName.set(artifactName)
archiveClassifier.set("javadoc")
from(javadoc, "LICENSE")
from(javadoc)
}

artifacts {
Expand Down Expand Up @@ -227,7 +228,7 @@ tasks.register<Javadoc>("aggregateJavadoc") {
val projectsToDoc = Artifact.values().map { project(it.subprojectName) }
dependsOn(projectsToDoc.map { it.getTasksByName("classes", true) })
source(projectsToDoc.map { it.sourceSets["main"].java })
destinationDir = File("${layout.buildDirectory.get().asFile}/docs/javadoc")
setDestinationDir(File("${layout.buildDirectory.get().asFile}/docs/javadoc"))

classpath = files(projectsToDoc.map { it.configurations["compileClasspath"].files })

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ projVersion=0.1.0-SNAPSHOT
projVcs=Over-Run/overrungl
projBranch=main
projLicenseYear=2024
projLicenseFileName=LICENSE

# Organization
orgName=Overrun Organization
orgUrl=https://over-run.github.io/

jdkVersion=22
jdkEnablePreview=true
jdkEarlyAccessDoc=jdk22
#jdkEarlyAccessDoc=jdk22
kotlinTargetJdkVersion=21

overrunMarshalVersion=0.1.0-alpha.24-jdk22
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 7e77231

Please sign in to comment.