Skip to content

Commit 3e88cd4

Browse files
authored
Merge from staging repo to release v4.0.0 (#191)
Replaced legacy implementation with new one implemented from scratch. BREAKING CHANGE: This version drop support for `emacs` reporting and `sourceSets` property in extension. It also changed the name of package, to avoid mixing with legacy implementation.
1 parent 3d91ea9 commit 3e88cd4

File tree

106 files changed

+12091
-3364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+12091
-3364
lines changed

.githooks/.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
applypatch-msg
2+
commit-msg
3+
post-applypatch
4+
post-commit
5+
post-merge
6+
post-receive
7+
post-rewrite
8+
post-update
9+
pre-applypatch
10+
pre-auto-gc
11+
pre-commit
12+
pre-merge-commit
13+
pre-push
14+
pre-rebase
15+
pre-receive
16+
prepare-commit-msg
17+
push-to-checkout
18+
sendemail-validate
19+
update
20+
husky.*

.githooks/post-checkout

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
# This script installs the development toolchain runs on node.js (commitlint, husky, prettier, etc.).
4+
# It helps Java engineers to set up full development toolchain seamless.
5+
#
6+
# Gradle plugin (ghooks.gradle) will install this git-hook script.
7+
# We use `post-checkout` because `pre-commit` is used by husky to lint code, and
8+
# `post-clone` is still unofficial so we have no other hook runs before the commit.
9+
10+
set -e
11+
12+
if [ ! -d "node_modules" ]
13+
then
14+
if [ -x "$(command -v yarn)" ]
15+
then
16+
echo "🔍🐛 node_modules directory not found, running `yarn install` to install the dev toolchain..."
17+
yarn install
18+
echo "🔍🐛 The dev toolchain has been installed."
19+
else
20+
echo "🔍🐛 The yarn command not found. Please install it to keep your commit clean:"
21+
echo "🔍🐛 https://yarnpkg.com/en/docs/install"
22+
fi
23+
fi

.github/CONTRIBUTING.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing Guideline
2+
3+
## How to hack this project
4+
5+
Make sure you have Java 11+, Node.js 12+ and NPM on your `PATH`.
6+
7+
Before you start hacking, run `npm install` once to install development toolchain
8+
to follow [the Conventional Commits](https://conventionalcommits.org/).
9+
10+
To build the implementation and test, run `./gradlew` then it runs all necessary formatter, compile and test.
11+
12+
## How to use latest plugin in your project
13+
14+
To test your changes, you need to build and install the plugin by your own.
15+
16+
To install the plugin into your Maven Local Repository, add `apply plugin: 'maven-publish'` to `build.gradle` and run `./gradlew publishToMavenLocal`. Then you can use the installed plugin like below:
17+
18+
```groovy
19+
buildscript {
20+
repositories {
21+
maven {
22+
url "https://plugins.gradle.org/m2/"
23+
}
24+
mavenLocal()
25+
}
26+
dependencies {
27+
classpath "com.github.spotbugs.snom:spotbugs-gradle-plugin:(YOUR_VERSION)"
28+
}
29+
}
30+
31+
apply plugin: "com.github.spotbugs.snom"
32+
```
33+
34+
## Before reporting a problem
35+
36+
When you find problems and want to share with the community, consider to add some JUnit test cases to reproduce.
37+
Just two steps to follow:
38+
39+
1. Create a [minimum and complete](http://stackoverflow.com/help/mcve) project, and reproduce it by [functional testing](https://guides.gradle.org/testing-gradle-plugins/). The test code is located in `src/functionalTest` directory.
40+
2. Confirm that `./gradlew clean build` fails by the newly added test case.

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [KengoTODA]

.github/auto-merge.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
minApprovals:
2+
NONE: 0
3+
requiredLabels:
4+
- dependencies
5+
updateBranch: true
6+
mergeMethod: rebase

.github/issuehunt-shield-v1.svg

+85
Loading

.github/workflows/gradle.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
gradle: ['5.6', '6.0', '6.1', '6.2']
18+
steps:
19+
- uses: actions/checkout@722adc6
20+
with:
21+
fetch-depth: 0
22+
- name: Set up JDK 11
23+
uses: actions/setup-java@081536e
24+
with:
25+
java-version: 11
26+
- name: Set up Node.js 12
27+
uses: actions/setup-node@8de2f9f
28+
with:
29+
node-version: 12
30+
- uses: actions/cache@cffae95
31+
with:
32+
path: ~/.gradle/caches
33+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
34+
restore-keys: |
35+
${{ runner.os }}-gradle-
36+
- name: Gradle Wrapper Validation
37+
uses: gradle/wrapper-validation-action@v1
38+
- name: Build with Gradle
39+
run: ./gradlew build --no-daemon -Dsnom.test.functional.gradle=${{ matrix.gradle }}
40+
- name: Run Semantic Release
41+
run: |
42+
echo "gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}" > ~/.gradle/gradle.properties
43+
echo "gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}" >> ~/.gradle/gradle.properties
44+
rm -rf build/libs/*.jar
45+
npm ci
46+
npm run semantic-release
47+
if: matrix.gradle == '6.0'
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
- name: Run SonarQube Scanner
51+
run: |
52+
if [ "$SONAR_LOGIN" != "" ]; then
53+
./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
54+
fi
55+
if: matrix.gradle == '6.0'
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
59+
- uses: actions/upload-artifact@3446296
60+
if: always()
61+
with:
62+
name: reports
63+
path: build/reports

.github/workflows/javadoc.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Javadoc
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
javadoc:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@af513c7
12+
- name: Set up JDK 11
13+
uses: actions/setup-java@081536e
14+
with:
15+
java-version: 11
16+
- name: Set up Node.js 12
17+
uses: actions/setup-node@8de2f9f
18+
with:
19+
node-version: 12
20+
- name: Generate Groovydoc
21+
run: ./gradlew groovydoc
22+
- name: Prepare to Deploy
23+
run: |
24+
npm ci
25+
rm -f .git/hooks/commit-msg
26+
- name: Deploy
27+
uses: JamesIves/github-pages-deploy-action@c74c1d2
28+
with:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
BRANCH: gh-pages
31+
FOLDER: build/docs/groovydoc/

0 commit comments

Comments
 (0)