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

Init project #1

Merged
merged 39 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
299374e
Add `config`
alexander-yevsyukov Apr 25, 2024
b9ba67a
Add build scripts
alexander-yevsyukov Apr 25, 2024
0297143
Auto-updated by IDEA
alexander-yevsyukov Apr 25, 2024
9b47221
Optimise imports
alexander-yevsyukov Apr 25, 2024
35e5c69
Add dependency reports
alexander-yevsyukov Apr 25, 2024
b39fafb
Add name constants
alexander-yevsyukov Apr 25, 2024
7066b3f
Tune dependencies
alexander-yevsyukov Apr 26, 2024
ef3d768
Draft Gradle plugin
alexander-yevsyukov Apr 26, 2024
5cfdaa6
Add missing script
alexander-yevsyukov Apr 26, 2024
a3f6d9b
Split tuning of a `GenerateProtoTask` to specific functions
alexander-yevsyukov Apr 26, 2024
25592cf
Add the common prefix to the `pluginMaven` publication
alexander-yevsyukov Apr 26, 2024
e4550b0
Update build time
alexander-yevsyukov Apr 26, 2024
fefa23c
Add `foojay-resolver-convention` plugin
alexander-yevsyukov Apr 26, 2024
9d9aadb
Add `default-values` test project
alexander-yevsyukov Apr 27, 2024
8ae379a
Fix reference from the plugin marker artifact
alexander-yevsyukov Apr 27, 2024
c7b0052
Add `protoc` plugin
alexander-yevsyukov Apr 27, 2024
ae8e9e1
Add convention for `artifact` property
alexander-yevsyukov Apr 27, 2024
3ed2b48
Extract path-related utils
alexander-yevsyukov Apr 27, 2024
af8bb19
Document `Protobuf.javaLib` property
alexander-yevsyukov Apr 27, 2024
ec5ed8a
Update dependency reports
alexander-yevsyukov Apr 27, 2024
b99eb53
Document adding gmarker dependency prefix
alexander-yevsyukov Apr 29, 2024
a2fb60a
Put all files under `prototap` dir
alexander-yevsyukov Apr 29, 2024
4cbc2d9
Add test for proto files under `test`
alexander-yevsyukov Apr 29, 2024
3976d53
Update build time
alexander-yevsyukov Apr 29, 2024
204a797
Add test for running with settings
alexander-yevsyukov Apr 30, 2024
6b948dc
Bump version -> `0.8.0`
alexander-yevsyukov Apr 30, 2024
91a3550
Update dependency reports
alexander-yevsyukov Apr 30, 2024
3f603c0
Add test for running via `classpath` dependency
alexander-yevsyukov Apr 30, 2024
eff2854
Exclude unnecessary files from fat JARs
alexander-yevsyukov Apr 30, 2024
054e5a1
Add text to README
alexander-yevsyukov Apr 30, 2024
b5d85d6
Update build time
alexander-yevsyukov Apr 30, 2024
412b0aa
Improve readme wording
alexander-yevsyukov Apr 30, 2024
9e18ca5
Document `Paths` object
alexander-yevsyukov May 1, 2024
210f9a1
Remove trailing empty line
alexander-yevsyukov May 1, 2024
1ff7a2b
Remove trailing empty line
alexander-yevsyukov May 1, 2024
016fbb3
Improve `main` docs
alexander-yevsyukov May 1, 2024
23a9622
Update build time
alexander-yevsyukov May 1, 2024
65a0060
Rearrange API calls related to debugging
alexander-yevsyukov May 1, 2024
6fc363b
Rearrange API calls related to debugging
alexander-yevsyukov May 1, 2024
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
29 changes: 29 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# See default configuration here: https://github.com/codecov/support/blob/master/codecov.yml
#
# For more options see: https://gist.github.com/stevepeak/53bee7b2c326b24a9b4a
#
# Codecov documentation is available here: https://codecov.io/docs

coverage:
ignore:
- "**/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"
61 changes: 61 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.

# Common formats
*.html text
*.xml text
*.css text
*.scss text
*.js text
*.properties text
*.rtf text
*.yaml text
*.yml text
*.md text

LICENSE text

# SQL scripts
*.sql text

# Java sources
*.java text

# Python sources
*.py text

# Gradle build files
*.gradle text

# Google protocol buffers
*.proto text

# Miscellaneous
*.rb text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf

# Declare files that will always have LF line endings on checkout.
*.sh text eol=lf
gradlew text eol=lf
pull text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.swf binary
*.jar binary
*.desc binary

*.scpt binary
*.scssc binary

# 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.
37 changes: 37 additions & 0 deletions .github/workflows/build-on-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build under Ubuntu

on: push

jobs:
build:
name: Build under Ubuntu
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'

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

- 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/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
require_tests: true # will fail workflow if test reports not found

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

on: pull_request

jobs:
build:
name: Build under Windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'

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

# See: https://github.com/al-cheb/configure-pagefile-action
- name: Configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.3

- 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/action-junit-report@v4.0.3
if: always() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/**/TEST-*.xml'
require_tests: true # will fail workflow if test reports not found
25 changes: 25 additions & 0 deletions .github/workflows/ensure-reports-updated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Ensures that the license report files were modified in this PR.

name: Ensure license reports updated

on:
pull_request:
branches:
- '**'

jobs:
build:
name: Ensure license reports updated
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
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 both `pom.xml` and license report files are modified
shell: bash
run: chmod +x ./config/scripts/ensure-reports-updated.sh && ./config/scripts/ensure-reports-updated.sh
19 changes: 19 additions & 0 deletions .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
29 changes: 29 additions & 0 deletions .github/workflows/increment-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Ensures that the current lib version is not yet published but executing the Gradle
# `checkVersionIncrement` task.

name: Check version increment

on:
push:
branches:
- '**'

jobs:
build:
name: Check version increment
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'

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

- name: Check version is not yet published
shell: bash
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@v3
with:
submodules: 'true'

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

- 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: developers@spine.io
# 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 }}
Loading
Loading