Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f0d6e5f
Update config
alexander-yevsyukov Dec 7, 2021
d8108b2
Update Java version
alexander-yevsyukov Dec 7, 2021
d21f3a8
Update config
alexander-yevsyukov Dec 7, 2021
e4df662
Update to most recent tools API
alexander-yevsyukov Dec 7, 2021
2d72968
Remove trailing EOF
alexander-yevsyukov Dec 7, 2021
b415c93
Add explicit type cast
alexander-yevsyukov Dec 7, 2021
0323813
Update config
alexander-yevsyukov Dec 8, 2021
90623e9
Bump JDK -> 11
alexander-yevsyukov Dec 8, 2021
98c121f
Update config
alexander-yevsyukov Dec 8, 2021
b204e9a
Restore build template location
alexander-yevsyukov Dec 8, 2021
a351ce1
Use `compileOnly` instead of `compile`
alexander-yevsyukov Dec 8, 2021
de05280
Fix copying `build.gradle`
alexander-yevsyukov Dec 8, 2021
7a28e77
Update Java version
alexander-yevsyukov Dec 8, 2021
b521c57
Set Java version to 11
alexander-yevsyukov Dec 8, 2021
bd897a8
Improve code layout
alexander-yevsyukov Dec 8, 2021
a6aafdb
Improve code layout
alexander-yevsyukov Dec 8, 2021
e2d506c
Fix method name
alexander-yevsyukov Dec 8, 2021
c89d40e
Fix the group reference of tool artifacts
alexander-yevsyukov Dec 8, 2021
84727c3
Temporarily use CloudRepo
alexander-yevsyukov Dec 8, 2021
5748f48
Temporarily comment out Maven content filtering
alexander-yevsyukov Dec 8, 2021
7b1566c
Remove javac setup for Error Prone
alexander-yevsyukov Dec 8, 2021
e4a7657
Bump versions
alexander-yevsyukov Dec 8, 2021
d6161d9
Suppress unused warning (temporarily)
alexander-yevsyukov Dec 8, 2021
bc4b7cf
Remove redundant cast
alexander-yevsyukov Dec 8, 2021
b8efbd6
Restore closure-handling API
alexander-yevsyukov Dec 8, 2021
b4169fe
Limit project setup to only required files
alexander-yevsyukov Dec 8, 2021
94fe7b1
Address deprecated Gradle API
alexander-yevsyukov Dec 8, 2021
fb4f06d
Improve path assertions, fix project setups
alexander-yevsyukov Dec 8, 2021
55dd6b6
Fix Java version
alexander-yevsyukov Dec 8, 2021
d2f4c20
Improve code layout
alexander-yevsyukov Dec 8, 2021
5eec33e
Remove IDEA configuration
alexander-yevsyukov Dec 8, 2021
2a3ae73
Get `ProtobufConfigurator` via Kotlin extension
alexander-yevsyukov Dec 8, 2021
b1f3b15
Restore layout
alexander-yevsyukov Dec 8, 2021
2f93292
Turn `--info` for running Dart gen.
alexander-yevsyukov Dec 8, 2021
8c77dfa
Fix new tool name
alexander-yevsyukov Dec 8, 2021
cdc0548
Restore tool name
alexander-yevsyukov Dec 8, 2021
8a6a71f
Add test Javadoc
alexander-yevsyukov Dec 8, 2021
93757d5
Update config
alexander-yevsyukov Dec 9, 2021
cd9ee63
Fix new API calls
alexander-yevsyukov Dec 10, 2021
66b4fb0
Bump `tool-base`
alexander-yevsyukov Dec 10, 2021
1e777c9
Fix imports
alexander-yevsyukov Dec 12, 2021
ffb45fc
Bump versions
alexander-yevsyukov Dec 12, 2021
87bbe25
Simplify plugin ID
alexander-yevsyukov Dec 12, 2021
6c7a7e8
Bump base
alexander-yevsyukov Dec 14, 2021
38ceeac
Simplify task dependencies
alexander-yevsyukov Dec 14, 2021
d5a354b
Update config
alexander-yevsyukov Dec 14, 2021
fcd46f6
Improve JVM version constants
alexander-yevsyukov Dec 14, 2021
9aa637a
Simplify adding plugin
alexander-yevsyukov Dec 14, 2021
79c2385
Adopt `var`s
alexander-yevsyukov Dec 14, 2021
1dc8f68
Simplify switching built-ins
alexander-yevsyukov Dec 14, 2021
44520bd
Document comment out line
alexander-yevsyukov Dec 14, 2021
9d0aa28
Use Java 11
alexander-yevsyukov Dec 14, 2021
dcb8264
Add root project report tasks
alexander-yevsyukov Dec 14, 2021
0b6d18f
Fix missing imports
alexander-yevsyukov Dec 14, 2021
cc7fce3
Install Dart on Windows
alexander-yevsyukov Dec 15, 2021
7c06aa6
Install Dart on Ubuntu
alexander-yevsyukov Dec 15, 2021
d982730
Update build times
alexander-yevsyukov Dec 15, 2021
bc31f5e
Fix updating PATH
alexander-yevsyukov Dec 15, 2021
0b39830
See if PATH was updated
alexander-yevsyukov Dec 15, 2021
f210cb6
Activate Dart protoc plugin as a separate step
alexander-yevsyukov Dec 15, 2021
3e7bcd2
Fix shell spec.
alexander-yevsyukov Dec 15, 2021
337f032
Add Gradle Kotlin DSL dependency
alexander-yevsyukov Dec 15, 2021
fbade43
Remove Travis build
alexander-yevsyukov Dec 15, 2021
8264e51
Simplify resource filtering
alexander-yevsyukov Dec 15, 2021
1fe9222
Use Cloud Artifact Registry for artifact snapshots
alexander-yevsyukov Dec 15, 2021
dcc9260
Update build time
alexander-yevsyukov Dec 15, 2021
b8e2fe4
Add missing GitHub repos
alexander-yevsyukov Dec 15, 2021
3665e9a
Consolidate plugin publishing settings
alexander-yevsyukov Dec 15, 2021
473828a
Remove deprecated call
alexander-yevsyukov Dec 15, 2021
72ad536
Temporarily turn runner debug mode
alexander-yevsyukov Dec 16, 2021
d1bfb05
Bump `mc-java`
alexander-yevsyukov Dec 16, 2021
39961e9
Update config
alexander-yevsyukov Apr 18, 2022
a29db74
Merge branch 'master' into new-api
alexander-yevsyukov Apr 18, 2022
f3ee55a
Remove outdated scripts
alexander-yevsyukov Apr 18, 2022
a7b9b90
Adopt new project testing API
alexander-yevsyukov Apr 18, 2022
e896860
Bump versions
alexander-yevsyukov Apr 18, 2022
01fa3f1
Adopt new publishing API
alexander-yevsyukov Apr 18, 2022
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
18 changes: 15 additions & 3 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@

coverage:
ignore:
- generated/*
- examples/*
- test/*
- "**/generated/**/*"
- "**/examples/**/*"
- "**/test/**/*"
status:
# https://docs.codecov.com/docs/github-checks#yaml-configuration-for-github-checks-and-codecov
patch: false
# https://docs.codecov.com/docs/commit-status
project:
default:
target: auto
threshold: 0.05%
base: auto
paths:
- "src"
if_ci_failed: error
informational: false
only_pulls: true

comment:
layout: "header, diff, changes, uncovered"
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ pull text eol=lf
*.scpt binary
*.scssc binary

# Encoded files
# Encrypted files
*.enc binary
*.gpg binary
*.weis binary
Binary file added .github/keys/cloudrepo.properties.gpg
Binary file not shown.
Binary file added .github/keys/deploy_key_rsa.gpg
Binary file not shown.
Binary file added .github/keys/firebase-sa.json.gpg
Binary file not shown.
Binary file added .github/keys/gcs-auth-key.json.gpg
Binary file not shown.
2 changes: 2 additions & 0 deletions .github/keys/gradle-plugin-portal.secret.properties.gpg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
� 2�.y�:���ҢF����`�J�1$�����9�������� D~�z�e��!yu��GBU��2�K�0�!�� ����q =���˂p�������@z����e�qB�>�R#�qj�?�1��m굘U��^�2��*���k��J� 3�w�q84}.
�2��M<�
Expand Down
Binary file added .github/keys/maven-publisher.json.gpg
Binary file not shown.
36 changes: 36 additions & 0 deletions .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build under Ubuntu

on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
cache: gradle

- name: Pull config
run: git submodule update --init --recursive

- name: Build project and run tests
shell: bash
run: ./gradlew build --stacktrace

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Upload code coverage report
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false
verbose: true
31 changes: 31 additions & 0 deletions .github/workflows/build-on-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build under Windows

on: pull_request

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
cache: gradle

- name: Pull config
run: git submodule update --init --recursive

- name: Build project and run tests
shell: cmd
# For the reason on `--no-daemon` see https://github.com/actions/cache/issues/454
run: gradlew.bat build --stacktrace --no-daemon

# See: https://github.com/marketplace/actions/junit-report-action
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
103 changes: 103 additions & 0 deletions .github/workflows/detekt-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# This workflow performs a static analysis of your Kotlin source code using
# Detekt.
#
# Scans are triggered:
# 1. On every push to default and protected branches
# 2. On every Pull Request targeting the default branch
# 3. On a weekly schedule
# 4. Manually, on demand, via the "workflow_dispatch" event
#
# The workflow should work with no modifications, but you might like to use a
# later version of the Detekt CLI by modifing the $DETEKT_RELEASE_TAG
# environment variable.
name: Scan with Detekt

on:
# Triggers the workflow on push or pull request events but only for default and protected branches
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '19 17 * * 4'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# Release tag associated with version of Detekt to be installed
# SARIF support (required for this workflow) was introduced in Detekt v1.15.0
DETEKT_RELEASE_TAG: v1.15.0

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "scan"
scan:
name: Scan
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Gets the download URL associated with the $DETEKT_RELEASE_TAG
- name: Get Detekt download URL
id: detekt_info
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DETEKT_DOWNLOAD_URL=$( gh api graphql --field tagName=$DETEKT_RELEASE_TAG --raw-field query='
query getReleaseAssetDownloadUrl($tagName: String!) {
repository(name: "detekt", owner: "detekt") {
release(tagName: $tagName) {
releaseAssets(name: "detekt", first: 1) {
nodes {
downloadUrl
}
}
}
}
}
' | \
jq --raw-output '.data.repository.release.releaseAssets.nodes[0].downloadUrl' )
echo "::set-output name=download_url::$DETEKT_DOWNLOAD_URL"

# Sets up the detekt cli
- name: Setup Detekt
run: |
dest=$( mktemp -d )
curl --request GET \
--url ${{ steps.detekt_info.outputs.download_url }} \
--silent \
--location \
--output $dest/detekt
chmod a+x $dest/detekt
echo $dest >> $GITHUB_PATH

# Performs static analysis using Detekt
- name: Run Detekt
continue-on-error: true
run: |
detekt --input ${{ github.workspace }} --report sarif:${{ github.workspace }}/detekt.sarif.json

# Modifies the SARIF output produced by Detekt so that absolute URIs are relative
# This is so we can easily map results onto their source files
# This can be removed once relative URI support lands in Detekt: https://git.io/JLBbA
- name: Make artifact location URIs relative
continue-on-error: true
run: |
echo "$(
jq \
--arg github_workspace ${{ github.workspace }} \
'. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \
${{ github.workspace }}/detekt.sarif.json
)" > ${{ github.workspace }}/detekt.sarif.json

# Uploads results to GitHub repository using the upload-sarif action
- uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: ${{ github.workspace }}/detekt.sarif.json
checkout_path: ${{ github.workspace }}
24 changes: 24 additions & 0 deletions .github/workflows/ensure-reports.updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ensures that the license report files were modified in this PR.

name: Ensure license reports updated

on:
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
# Configure the checkout of all branches, so that it is possible to run the comparison.
fetch-depth: 0
# Check out the `config` submodule to fetch the required script file.
submodules: true

- name: Check that `pom.xml` and `license-report.md` are modified
shell: bash
run: chmod +x ./config/scripts/ensure-reports-updated.sh && ./config/scripts/ensure-reports-updated.sh
18 changes: 18 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Validate Gradle Wrapper
on:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
validation:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
uses: actions/checkout@v2
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ name: Check version increment

on:
push:
branches: '**'
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: 1.8
java-version: 11
distribution: zulu
cache: gradle

- name: Pull config
run: git submodule update --init --recursive

- name: Check version is not yet published
shell: bash
run: ./gradlew checkVersionIncrement
run: ./gradlew checkVersionIncrement --stacktrace
63 changes: 63 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Publish

on:
push:
branches: [master]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
java-version: 11
distribution: zulu
cache: gradle

- run: git submodule update --init --recursive

- name: Decrypt CloudRepo credentials
run: ./config/scripts/decrypt.sh "$CLOUDREPO_CREDENTIALS_KEY" ./.github/keys/cloudrepo.properties.gpg ./cloudrepo.properties
env:
CLOUDREPO_CREDENTIALS_KEY: ${{ secrets.CLOUDREPO_CREDENTIALS_KEY }}

- name: Decrypt Git SSH credentials
run: ./config/scripts/decrypt.sh "$GIT_CREDENTIALS_KEY" ./.github/keys/deploy_key_rsa.gpg ./deploy_key_rsa
env:
GIT_CREDENTIALS_KEY: ${{ secrets.GIT_CREDENTIALS_KEY }}

# Make sure the SSH key is not "too visible". SSH agent will not accept it otherwise.
- name: Set file system permissions
run: chmod 400 ./deploy_key_rsa && chmod +x ./config/scripts/register-ssh-key.sh

- name: Decrypt GCS credentials
run: ./config/scripts/decrypt.sh "$GCS_CREDENTIALS_KEY" ./.github/keys/gcs-auth-key.json.gpg ./gcs-auth-key.json
env:
GCS_CREDENTIALS_KEY: ${{ secrets.GCS_CREDENTIALS_KEY }}

- name: Decrypt GCAR credentials
run: ./config/scripts/decrypt.sh "$MAVEN_PUBLISHER_KEY" ./.github/keys/maven-publisher.json.gpg ./maven-publisher.json
env:
MAVEN_PUBLISHER_KEY: ${{ secrets.MAVEN_PUBLISHER_KEY }}

- name: Decrypt Git SSH credentials
run: ./config/scripts/decrypt.sh "$GRADLE_PORTAL_CREDENTIALS_KEY" ./.github/keys/gradle-plugin-portal.secret.properties.gpg ./gradle-plugin-portal.secret.properties
env:
GRADLE_PORTAL_CREDENTIALS_KEY: ${{ secrets.GRADLE_PORTAL_CREDENTIALS_KEY }}

- name: Append Gradle properties
run: cat ./gradle-plugin-portal.secret.properties >> ./gradle.properties

- name: Publish artifacts to Maven
# Since we're in the `master` branch already, this means that tests of a PR passed.
# So, no need to run the tests again when publishing.
run: ./gradlew publish -x test --stacktrace
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FORMAL_GIT_HUB_PAGES_AUTHOR: [email protected]
# https://docs.github.com/en/actions/reference/environment-variables
REPO_SLUG: $GITHUB_REPOSITORY # e.g. SpineEventEngine/core-java
GOOGLE_APPLICATION_CREDENTIALS: ./maven-publisher.json
NPM_TOKEN: ${{ secrets.NPM_SECRET }}
31 changes: 0 additions & 31 deletions .github/workflows/win.yml

This file was deleted.

Loading