Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
ci:
uses: killbill/gh-actions-shared/.github/workflows/ci.yml@main
with:
test-profile-matrix: '[ "travis" ]'
maven_args: >-
-Dmaven.test.redirectTestOutputToFile=true
-Dcheck.skip-dependency=true
-Dcheck.skip-dependency-scope=true
-Dcheck.skip-dependency-versions=true
-Dcheck.skip-duplicate-finder=true
-Dcheck.skip-enforcer=true
-Dcheck.skip-rat=true
28 changes: 28 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 8 * * 1"

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "11"
- uses: github/codeql-action/init@v3
with:
languages: java
- run: mvn -B -DskipTests package
- uses: github/codeql-action/analyze@v3
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "11"
- name: Build plugin
run: mvn -B clean verify
- name: Upload release asset
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
JAR="target/kintsugi-plugin-${VERSION}.jar"
if [[ ! -f "${JAR}" ]]; then
echo "Expected ${JAR} not found" >&2
ls -la target/ >&2
exit 1
fi
if ! gh release view "${GITHUB_REF_NAME}" >/dev/null 2>&1; then
gh release create "${GITHUB_REF_NAME}" --generate-notes
fi
gh release upload "${GITHUB_REF_NAME}" "${JAR}" --clobber
87 changes: 87 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# JetBrains IDEs
#
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea/**/contentModel.xml
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
.idea/**/gradle.xml
.idea/**/libraries
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr
out/

#
# Eclipse
#
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
.classpath
.externalToolBuilders/
*.launch
.factorypath
.buildpath
.target
.project

#
# Maven
#
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar

#
# Java
#
*.class
*.log
*.ctxt
.mtj.tmp/
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
hs_err_pid*

#
# macOS
#
.DS_Store
.AppleDouble
.LSOverride
docker/.env
39 changes: 39 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributing

Thanks for your interest in the Kill Bill Kintsugi tax plugin.

## Development setup

- **JDK 11** (required for `mvn verify` — matches CI; newer JDKs may break Mockito/OSGi test mocks)
- Maven 3.9+
- Optional: Docker for local Kill Bill testing (see [docker/README.md](docker/README.md))

## Build and test

```bash
mvn clean verify
```

Unit tests use **TestNG** with a `fast` group (same pattern as other Kill Bill invoice plugins). CI uses the shared [killbill/gh-actions-shared](https://github.com/killbill/gh-actions-shared) workflow on Java 11.

**Docker E2E** (recommended): see [docker/README.md](docker/README.md).

```bash
cp docker/.env.example docker/.env
./docker/run-e2e.sh
```

## Pull requests

1. Fork the repository and create a feature branch.
2. Keep changes focused; include tests for behavior changes.
3. Ensure `mvn verify` passes locally.
4. Open a PR with a clear summary and test notes.

## Code style

Match the existing code in this repository: Apache 2.0 headers on new Java files, minimal comments, and Kill Bill plugin conventions from [killbill-hello-world-java-plugin](https://github.com/killbill/killbill-hello-world-java-plugin).

## Releases

Maintainers cut releases from `main` using git tags (`v*`). The release workflow attaches the built JAR to the GitHub release.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -198,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading