Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade kotlin → 1.9.0, release 0.8.22 #4

Merged
merged 26 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
07f2a6f
chore: upgrade kotlin → `1.9.0`
sgammon Jul 30, 2023
4438dbf
chore: update locks and dependency metadata
sgammon Jul 30, 2023
23525b7
chore: correct license header
sgammon Jul 30, 2023
f28ef66
fix: artifact signing task dependencies
sgammon Jul 30, 2023
b92364e
chore: converge sources with upstream
sgammon Jul 30, 2023
de75ffb
chore: update api pins
sgammon Jul 30, 2023
5c27350
chore: converge build logic
sgammon Jul 30, 2023
117787d
chore: update kjs lock
sgammon Jul 30, 2023
27d20fa
chore: merge publishing logic
sgammon Jul 30, 2023
b8485be
chore: upgrade to buildless plugin
sgammon Jul 30, 2023
e6da8ec
Merge branch 'benasher44-master' into chore/kotlin-1.9.0
sgammon Jul 30, 2023
bbc1850
chore: update dependency metadata and locks
sgammon Jul 30, 2023
6279433
chore: finalize build with sbom
sgammon Jul 30, 2023
924c50f
chore: spdx/sigstore in ci
sgammon Jul 30, 2023
73534dd
fix: publishing to github packages
sgammon Jul 30, 2023
fedd0b0
fix: javadoc, publish to github packages
sgammon Jul 30, 2023
14ea4f7
chore: upgrade settings plugins
sgammon Jul 30, 2023
6398363
fix: dokka version (broken)
sgammon Jul 30, 2023
82c9e41
chore: upgrade ci workflows
sgammon Jul 30, 2023
fc49bc0
fix: only publish provenance for linux targets
sgammon Jul 30, 2023
4fc6488
chore: update lockfile, verification metadata
sgammon Jul 30, 2023
b20e3cc
fix: signing with gpg2 cmd
sgammon Jul 30, 2023
5ae9888
chore: buildscript cleanup
sgammon Jul 30, 2023
569f5bf
fix: coverage reporting to sonar and codecov
sgammon Jul 30, 2023
e206c93
fix: issues reported by sonar, detekt config update
sgammon Jul 30, 2023
17664c4
chore: update detect → `1.23.0`
sgammon Jul 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[*]
ktlint_standard_filename=disabled
14 changes: 9 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ jobs:
name: "Build (${{ matrix.label }})"

permissions:
contents: "read"
actions: "read"
contents: "write"
id-token: "write"
checks: "write"
pull-requests: "write"

strategy:
fail-fast: false
matrix:
runner: [macOS-latest, windows-latest-8-cores, ubuntu-latest-4-cores]
runner: [macOS-latest, windows-latest, ubuntu-latest]
include:
- runner: macOS-latest
flags: "--no-configuration-cache"
Expand All @@ -41,22 +42,25 @@ jobs:
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
- runner: windows-latest-8-cores
provenance: false
- runner: windows-latest
flags: "--no-configuration-cache"
os: "windows"
label: "Windows"
experimental: false
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
- runner: ubuntu-latest-4-cores
provenance: false
- runner: ubuntu-latest
flags: "--no-configuration-cache -PsonarScan=true"
os: "linux"
label: "Linux"
experimental: false
coverage: true
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
provenance: true

uses: ./.github/workflows/step.build.yml
secrets: inherit
Expand All @@ -66,9 +70,9 @@ jobs:
label: ${{ matrix.label }}
flags: ${{ matrix.flags }}
experimental: ${{ matrix.experimental }}
gvm: ${{ matrix.gvm }}
java: ${{ matrix.java }}
coverage: ${{ matrix.coverage }}
provenance: ${{ matrix.provenance }}

codeql:
name: "Analysis: CodeQL"
Expand Down
53 changes: 40 additions & 13 deletions .github/workflows/step.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ on:
required: false
type: string
default: "--no-configuration-cache"
gvm:
required: false
type: string
default: ${{ vars.GVM_VERSION }}
java:
required: false
type: string
default: ${{ vars.JVM_VERSION }}
default: 20
coverage:
required: false
type: boolean
default: true
provenance:
required: false
type: boolean
default: true
experimental:
required: false
type: boolean
Expand Down Expand Up @@ -64,11 +64,14 @@ jobs:
checks: "write"
pull-requests: "write"

outputs:
hashes: ${{ steps.hash.outputs.hashes }}

steps:
- name: "Setup: Checkout"
uses: actions/checkout@v3
- name: "Setup: Cache"
uses: actions/cache@v3
uses: buildjet/cache@v3
with:
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}-${{ hashFiles('gradle/libs.versions.toml') }}
restore-keys: |
Expand All @@ -77,12 +80,11 @@ jobs:
~/.sonar/cache
~/.konan
~/.gradle/caches
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
- name: "Setup: Zulu 20"
uses: buildjet/setup-java@v3
with:
version: ${{ inputs.gvm }}
java-version: ${{ inputs.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'zulu'
java-version: '20'
- name: "Build and Test"
uses: gradle/gradle-build-action@v2
id: gradlebuild
Expand All @@ -91,6 +93,7 @@ jobs:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/beta' }}
gradle-version: wrapper
gradle-home-cache-cleanup: true
dependency-graph: generate
gradle-home-cache-includes: |
caches
notifications
Expand All @@ -101,12 +104,18 @@ jobs:
arguments: |
preMerge
-PVERSION=1.0-SNAPSHOT
-PsonarScan=true
--scan
--no-daemon
--warning-mode=none
--dependency-verification=lenient
-Pci=true
${{ inputs.flags }}
- name: "Build: Provenance Subject"
id: hash
if: inputs.provenance
run: |
echo "hashes=$(sha256sum ./build/libs/* | base64 -w0)" >> "$GITHUB_OUTPUT"
- name: "Analysis: Build Reports"
uses: actions/upload-artifact@v3
if: failure() || success()
Expand All @@ -115,7 +124,25 @@ jobs:
path: |
build/api/
build/reports/
build/spdx/
build/test-results/
- name: "Analysis: Coverage"
if: ${{ inputs.coverage }}
- name: "Report: Codecov (Server)"
if: inputs.coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/reports/kover/report.xml

## Report: Provenance
provenance:
name: Provenance
needs: [build]
if: inputs.provenance
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
upload-assets: false
52 changes: 42 additions & 10 deletions .github/workflows/step.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,17 @@ jobs:
name: Publish
runs-on: ${{ matrix.runner }}

permissions:
id-token: write
contents: read

outputs:
hashes: ${{ steps.hash.outputs.hashes }}

strategy:
fail-fast: false
matrix:
runner: [macOS-latest, windows-latest-8-cores, ubuntu-latest-4-cores]
runner: [macOS-latest, windows-latest, ubuntu-latest]
include:
- runner: macOS-latest
flags: "--no-configuration-cache"
Expand All @@ -123,14 +130,14 @@ jobs:
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
target: publishMac
- runner: windows-latest-8-cores
- runner: windows-latest
flags: "--no-configuration-cache"
os: "windows"
label: "Windows"
gvm: ${{ vars.GVM_VERSION }}
java: ${{ vars.JVM_VERSION }}
target: publishWindows
- runner: ubuntu-latest-4-cores
- runner: ubuntu-latest
flags: "--no-configuration-cache"
os: "linux"
label: "Linux"
Expand All @@ -142,7 +149,7 @@ jobs:
- name: "Setup: Checkout"
uses: actions/checkout@v3
- name: "Setup: Cache"
uses: actions/cache@v3
uses: buildjet/cache@v3
with:
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}-${{ hashFiles('gradle/libs.versions.toml') }}
restore-keys: |
Expand All @@ -162,19 +169,19 @@ jobs:
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '${{ vars.GCLOUD_VERSION }}'
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
- name: "Setup: Zulu 20"
uses: buildjet/setup-java@v3
with:
version: ${{ matrix.gvm }}
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'zulu'
java-version: '20'
- name: "Publish (${{ matrix.label }})"
uses: gradle/gradle-build-action@v2
id: publish
with:
cache-read-only: true
gradle-version: wrapper
gradle-home-cache-cleanup: true
dependency-graph: generate-and-submit
gradle-home-cache-includes: |
caches
notifications
Expand All @@ -194,10 +201,35 @@ jobs:
--${{ inputs.logLevel }}
${{ inputs.flags }}
${{ matrix.flags }}
- name: "Build: Provenance Subject"
id: hash
run: |
echo "hashes=$(sha256sum ./build/libs/* | base64 -w0)" >> "$GITHUB_OUTPUT"
- name: "Artifacts: Libraries"
uses: actions/upload-artifact@v3
if: failure() || success()
with:
name: reports
name: libraries
path: |
build/libs/
build/spdx/
- name: "Artifacts: Reports"
uses: actions/upload-artifact@v3
if: failure() || success()
with:
name: reports
path: |
build/reports/

## Report: Provenance
provenance:
name: Provenance
needs: [publish]
permissions:
actions: read
id-token: write
contents: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0
with:
base64-subjects: "${{ needs.build.outputs.hashes }}"
upload-assets: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A Kotlin Multiplatform UUID

[![Maven Central](https://img.shields.io/maven-central/v/dev.elide/uuid.svg?label=mavenCentral%28%29)](https://search.maven.org/artifact/dev.elide/uuid)
[![Build Status](https://github.com/benasher44/uuid/workflows/master/badge.svg)](https://github.com/benasher44/uuid/actions?query=workflow%3Amaster)
[![Build](https://github.com/elide-dev/uuid/actions/workflows/step.build.yml/badge.svg)](https://github.com/elide-dev/uuid/actions/workflows/step.build.yml)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)

K/N doesn't have a UUID yet. This brings a UUID that matches UUIDs on various platforms:
Expand Down
2 changes: 1 addition & 1 deletion api/uuid.api
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract interface class dev/elide/uuid/UuidHasher {
public abstract fun update ([B)V
}

public final class dev/elide/uuid/UuidJvm {
public final class dev/elide/uuid/UuidKt {
public static final fun getBytes (Ljava/util/UUID;)[B
public static final fun getVariant (Ljava/util/UUID;)I
public static final fun getVersion (Ljava/util/UUID;)I
Expand Down
Loading
Loading