Skip to content

Commit a0554e9

Browse files
committed
Initial commit (public release)
0 parents  commit a0554e9

32 files changed

+2460
-0
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*.kt]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = false
9+
max_line_length = 120
10+
tab_width = 4

.gitattributes

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gradle"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
timezone: "Europe/Budapest"
13+
# Maintain dependencies for GitHub Actions
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
timezone: "Europe/Budapest"

.github/workflows/gradle.yml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Gradle CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**" # needed, because otherwise it's triggered for release as well
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validation:
14+
name: Gradle Wrapper validation
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: gradle/wrapper-validation-action@v1
19+
compile-jdk8:
20+
needs: validation
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK ${{ matrix.java-version }}
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '8'
28+
distribution: 'temurin'
29+
architecture: 'x64'
30+
- name: Setup Gradle
31+
uses: gradle/gradle-build-action@v2
32+
- name: Execute Gradle build
33+
run: ./gradlew build
34+
env:
35+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}
36+
compile-jdk11:
37+
runs-on: ubuntu-latest
38+
needs: validation
39+
steps:
40+
- uses: actions/checkout@v3
41+
- name: Set up JDK 11
42+
uses: actions/setup-java@v3
43+
with:
44+
java-version: '11'
45+
distribution: 'temurin'
46+
architecture: 'x64'
47+
- name: Setup Gradle
48+
uses: gradle/gradle-build-action@v2
49+
- name: Execute Gradle build
50+
run: ./gradlew build
51+
env:
52+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}
53+
compile-jdk17:
54+
runs-on: ubuntu-latest
55+
needs: validation
56+
steps:
57+
- uses: actions/checkout@v3
58+
- name: Set up JDK 17
59+
uses: actions/setup-java@v3
60+
with:
61+
java-version: '17'
62+
distribution: 'temurin'
63+
architecture: 'x64'
64+
- name: Setup Gradle
65+
uses: gradle/gradle-build-action@v2
66+
- name: Execute Gradle build
67+
run: ./gradlew build
68+
env:
69+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}
70+
test:
71+
runs-on: ubuntu-latest
72+
needs: [ compile-jdk8, compile-jdk11 ]
73+
steps:
74+
- uses: actions/checkout@v3
75+
- name: Set up JDK 11
76+
uses: actions/setup-java@v3
77+
with:
78+
java-version: '11'
79+
distribution: 'temurin'
80+
architecture: 'x64'
81+
- name: Setup Gradle
82+
uses: gradle/gradle-build-action@v2
83+
- name: Run test
84+
run: ./gradlew check
85+
env:
86+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}

.github/workflows/release.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Release assets
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "[0-9]+.[0-9]+.[0-9]+"
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
validation:
14+
name: Gradle Wrapper validation
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: gradle/wrapper-validation-action@v1
19+
test:
20+
runs-on: ubuntu-latest
21+
needs: validation
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 11
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '11'
28+
distribution: 'temurin'
29+
architecture: 'x64'
30+
- name: Setup Gradle
31+
uses: gradle/gradle-build-action@v2
32+
- name: Run test
33+
run: ./gradlew check
34+
env:
35+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}
36+
release:
37+
runs-on: ubuntu-latest
38+
needs: test
39+
permissions:
40+
contents: write
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: Set up JDK 11
44+
uses: actions/setup-java@v3
45+
with:
46+
java-version: '11'
47+
distribution: 'temurin'
48+
architecture: 'x64'
49+
- name: Update repository index
50+
run: sudo apt-get update
51+
- name: Install gettext
52+
run: sudo apt-get install -y gettext
53+
- name: Setup Gradle
54+
uses: gradle/gradle-build-action@v2
55+
- name: Execute Gradle build
56+
run: ./gradlew dist generatePot
57+
env:
58+
GH_PACKAGE_REPO_TOKEN: ${{ secrets.GH_PACKAGE_REPO_TOKEN }}
59+
- name: Save version to an environment variable
60+
id: version_info
61+
run: echo PLUGIN_VERSION="$(cat version.txt)" >> $GITHUB_OUTPUT
62+
- name: Release
63+
uses: softprops/action-gh-release@v1
64+
with:
65+
generate_release_notes: true
66+
tag_name: ${{ steps.version_info.outputs.PLUGIN_VERSION }}
67+
body: For summarised changes, see [CHANGELOG.md](CHANGELOG.md).
68+
fail_on_unmatched_files: true
69+
files: |
70+
build/dist/*.jar
71+
build/i18n/pot/*.pot

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
.idea
7+
8+
version.txt

.gitlab-ci.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
stages:
2+
- verify
3+
- validate
4+
- visualize
5+
- package
6+
7+
compile-jdk8:
8+
stage: verify
9+
image: amd64/openjdk:8-jdk-bullseye
10+
script:
11+
- ./gradlew build
12+
13+
compile-jdk11:
14+
stage: verify
15+
image: amd64/openjdk:11-jdk-bullseye
16+
script:
17+
- ./gradlew build
18+
19+
compile-jdk17:
20+
stage: verify
21+
image: amd64/openjdk:17-jdk-bullseye
22+
script:
23+
- ./gradlew build
24+
25+
test:
26+
stage: validate
27+
image: amd64/openjdk:11-jdk-bullseye
28+
script:
29+
- ./gradlew check jacocoTestReport
30+
needs: [ "compile-jdk11" ]
31+
artifacts:
32+
reports:
33+
junit: build/test-results/test/**/TEST-*.xml
34+
paths:
35+
- build/reports/jacoco/test/jacocoTestReport.xml
36+
coverage: '/Branch coverage: \d+\.\d+/'
37+
38+
coverage:
39+
stage: visualize
40+
image: registry.gitlab.com/haynes/jacoco2cobertura:1.0.9
41+
script:
42+
- python /opt/cover2cover.py build/reports/jacoco/test/jacocoTestReport.xml $CI_PROJECT_DIR/src/main/kotlin/ > build/cobertura.xml
43+
needs: [ "test" ]
44+
artifacts:
45+
reports:
46+
coverage_report:
47+
coverage_format: cobertura
48+
path: build/cobertura.xml
49+
allow_failure: true
50+
51+
jar:
52+
stage: package
53+
image: amd64/openjdk:11-jdk-bullseye
54+
script:
55+
- apt-get update
56+
- apt-get install -y gettext
57+
- ./gradlew dist generatePot
58+
needs: [ "test" ]
59+
artifacts:
60+
paths:
61+
- build/dist/*.jar
62+
- build/i18n/pot/*.pot
63+
expire_in: 1 week

.gitlab/issue_templates/default.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#### What steps will reproduce the problem?
2+
3+
#### What is the expected result?
4+
5+
#### What happens instead?
6+
7+
#### Please provide any additional information below. Attach a screenshot if possible.
8+
9+
(Paste any relevant logs - please use code blocks to format console output, logs and code, as
10+
it's hard to read otherwise.)

0 commit comments

Comments
 (0)